- 17
- 89 914
Sabatino Develops
Belgium
Приєднався 26 тра 2010
I develop a multi-tenant food ordering app in Laravel & like talking about it 🤓
PHP 8.4 with Sabatino & Brent (Property hooks, Asymmetric visibility, Lazy objects and more)
#php #programming #webdev #laravel
Huge shout-out to Brent from @phpannotated for joining me in this conversation!
Read more about new features in PHP 8.4 on Brent's blog over at: stitcher.io/blog/new-in-php-84
---
In this conversation, we dive into the exciting new features of PHP 8.4, discussing its evolution, personal experiences with the language, and we discuss the new features introduced in PHP 8.4, including lazy objects, property hooks, asymmetric visibility, and the deprecation of implicit nullable types.
We talk about the the implications of these changes for developers, particularly in terms of code structure and best practices. Our discussion also touches on the evolution of PHP's features, the introduction of new functions like array_find, the importance of BC math's new object-oriented API and the new HTML5 parser.
www.sabatino.dev/php-8-4-with-sabatino-brent-property-hooks-asymmetric-visibility-lazy-objects-and-more/
Huge shout-out to Brent from @phpannotated for joining me in this conversation!
Read more about new features in PHP 8.4 on Brent's blog over at: stitcher.io/blog/new-in-php-84
---
In this conversation, we dive into the exciting new features of PHP 8.4, discussing its evolution, personal experiences with the language, and we discuss the new features introduced in PHP 8.4, including lazy objects, property hooks, asymmetric visibility, and the deprecation of implicit nullable types.
We talk about the the implications of these changes for developers, particularly in terms of code structure and best practices. Our discussion also touches on the evolution of PHP's features, the introduction of new functions like array_find, the importance of BC math's new object-oriented API and the new HTML5 parser.
www.sabatino.dev/php-8-4-with-sabatino-brent-property-hooks-asymmetric-visibility-lazy-objects-and-more/
Переглядів: 836
Відео
High-level architecture of my point-of-sales app (Laravel, Vue, IndexedDB, Electron & React Native)
Переглядів 5 тис.Місяць тому
#laravel #webdev #nodejs #reactnative #vuejs In addition to my online food ordering app, I also developed an in-store Point-of-sales system that works on iPads, Android devices and Windows systems. In this video, I’ll be diving into the high-level architecture of this application. Want to discuss your multi-tenant project? Book a consulting call: cal.com/sabatino/developer-consulting Links: - B...
How I manage 100+ apps using Expo & EAS (sample multi-tenant repository included!)
Переглядів 1,7 тис.2 місяці тому
#expo #eas #react #reactnative 00:00 - Start 00:29 - Project overview & starter kit 03:12 - Building the app 04:46 - Automating (almost) everything In this video I'll explain how I manage a multitenant application using Expo & EAS. Links: - Repository: github.com/SabatinoMasala/multitenant-expo - Blogpost: www.sabatino.dev/how-i-maintain-100-apps-using-expo-eas/
How does the Laravel defer helper work? (Plain PHP example included!)
Переглядів 2,5 тис.3 місяці тому
#webdev #laravel In this video we'll be taking an in-depth look at how the Laravel defer helper works. We'll be diving into the Response class of Symfony and we will explore a vanilla PHP example that illustrates how fastcgi can signal to the client that the response has been sent over. Blogpost: www.sabatino.dev/how-does-the-laravel-defer-helper-work-plain-php-example-included/ 00:00 - Start 0...
I developed an open-source faceless video automation service using Laravel (code included!)
Переглядів 7 тис.5 місяців тому
#laravel #webdev #webdevelopment #opensource #programming #ai #artificialintelligence #aws #remotion This open-source faceless video automation service has its roots in my commercial project VideoMat videomat.io. In this video I'll be going over the open-source faceless automation tool I created using Laravel & Remotion. During development of this project I also opened a PR to the Laravel frame...
Migrating from DatoCMS to Filament saved me €2,400! (Laravel + Filament marketing website setup)
Переглядів 3,6 тис.6 місяців тому
#laravel #webdevelopment #webdev #filamentphp #datocms #tailwind #vue #inertia DatoCMS is amazing, but we were paying over €2,400/yearly for a pretty simple website. In this video I'll be doing a deepdive in our new marketing website setup using Filament PHP. Links: - Marketing website starter kit: github.com/SabatinoMasala/filament-marketing-starter - Blog: sabatino.dev - Discord: discord.gg/b...
How to scale Laravel: beyond the basics (Advanced Laravel Scaling)
Переглядів 18 тис.6 місяців тому
#laravel #webdev #php #mysql #aws In this video we’ll be talking about some lesser known methods that helped me scale my Laravel apps to millions of users. I’ve got 5 great tips for you, so let's dive in! Want to discuss scaling your Laravel app? Book a consulting call: cal.com/sabatino/developer-consulting Article: www.sabatino.dev/how-to-scale-laravel-beyond-the-basics-advanced-laravel-scalin...
Building AI powered apps in Laravel using Replicate
Переглядів 7 тис.7 місяців тому
#laravel #webdev #artificialintelligence #stablediffusion #llm #gpt Links: - Article: www.sabatino.dev/building-ai-powered-apps-with-laravel-replicate/ - Replicate: replicate.com - replicate-php client: github.com/SabatinoMasala/replicate-php/ Over the past years I’ve built a handful of apps that heavily relied on LLM’s, diffusers and other AI models using Laravel. In this video, I’ll be showin...
DNS management in a multi-tenant setup
Переглядів 5 тис.8 місяців тому
#laravel #webdevelopment #webdev DNS management on a larger scale, for example in a multitenant application, can be a a massive pain. In this video we’ll be taking a look at how you can manage hundreds, if not thousands of custom domains for your multi-tenant application, without a headache! Want to discuss your multi-tenant project? Book a consulting call: cal.com/sabatino/developer-consulting...
Learnings from our multi-tenant Laravel application
Переглядів 21 тис.9 місяців тому
In this video we'll be taking an in-depth look at our multi-tenant food ordering app, that's built in Laravel. Want to discuss your multi-tenant project? Book a consulting call: cal.com/sabatino/developer-consulting Article: www.sabatino.dev/shared-database-multi-tenancy-in-laravel/ We'll talk about our single, shared database approach, and the issues that come with it. And finally we take a lo...
BFCache explained & how to make your webpage compatible with it
Переглядів 1,5 тис.9 місяців тому
#webdevelopment #javascript #frontend BFCache stands for backwards/forwards cache, and is a mechanism that allows browsers to keep a snapshot of an entirely rendered page in-memory. In this video we'll dive deeper into the mechanisms that allows browsers to render a webpage from the BFCache almost immediately, with barely any loadtimes. We also take a look at what happens to the execution of yo...
Scaling our Laravel app, after a flash sale took down our MySQL database
Переглядів 8 тис.10 місяців тому
#webdevelopment #laravel #developer #devops #mysql #redis #caching In this video I talk about how a sudden spike in traffic (ie. a Flash Sale) took down our database and Laravel app. Learn how we effectively scaled our app using an effective Redis caching strategy. Want to discuss your multi-tenant project? Book a consulting call: cal.com/sabatino/developer-consulting Shopify pod-based architec...
WebUSB is my favorite browser API
Переглядів 3,6 тис.10 місяців тому
#webdevelopment #frontend #webdeveloper WebUSB is an API that allows web applications to communicate directly with USB devices, bypassing the need for native drivers or middleware. As you might imagine, this opens up a universe of new possibilities for developers, making hardware more accessible than ever through the web. The video gives a high-level overview of the possibilities of WebUSB and ...
SVG ForeignObject saved us over €2,400 yearly!
Переглядів 1,6 тис.10 місяців тому
#webdevelopment #laravel #aws #devops I develop and maintain an ecommerce solution for restaurants and snackbars. A big part of our solution is streamlining the production process for takeout and delivery orders. At the heart of the production station, we install a tablet and a thermal printer, which will print the incoming orders and really help the merchant to keep their operations running sm...
Shipping Prisma in Electron was a mistake
Переглядів 1,2 тис.11 місяців тому
#webdevelopment #nodejs #frontend Lessons learned from converting our web-based app to Electron: ua-cam.com/video/J3PQyWN5bH0/v-deo.html Article: www.sabatino.dev/why-shipping-prisma-with-our-electron-app-was-a-mistake/ When we made the move to Electron, I had to decide which database-technology we wanted to use. I’m a big fan of Prisma so I thought to myself: Can we not simply ship Prisma with...
Pivoting to an offline-first app using Electron - lessons learned
Переглядів 81311 місяців тому
Pivoting to an offline-first app using Electron - lessons learned
NGINX worker connections caused downtime (how to configure nginx worker_connections properly)
Переглядів 1,4 тис.11 місяців тому
NGINX worker connections caused downtime (how to configure nginx worker_connections properly)
sir is this similar to micoro service architecture. New Subscriber
If you were to build another multi-tenant app again, will you use separate table for each tenant?
Depends on the context - but my preferred way is still 1 shared database.
First of all, I’d like to thank you for the excellent explanation about multi-tenancy. Regarding your advice to "avoid using global scope," you mentioned that in many cases, you needed to create queries without applying the global scope. My question is: were these queries primarily used for generating global management reports for internal purposes, such as tracking metrics like “how many sales were made across all tenants in the last day”? If that’s the case, wouldn’t it be better to implement a separate application specifically for management processes and reporting, rather than integrating such features directly into the client-facing application?
These queries were not used for internal purposes, we have an external service for internal reporting (eg. PowerBI), so yes, we have a separate system there :-)
@sabatino-dev Thanks for your response! Could you share some general examples of multi-tenant applications where bypassing the global scope is necessary? We’re currently planning to develop one and would like to understand these scenarios better.
Eg. in a ‘team’ situation you might end up with this issue. A user manages many tenants, but orders are globally scoped to the ‘current’ tenant. The user might want to see all orders across all the tenants they manage - that was a situation we ran into.
@@sabatino-dev Thank you for the clarification! That makes sense, especially in scenarios like managing orders across multiple tenants. It’s helpful to know that bypassing the global scope can address such cases. We’ll keep this in mind as we design our multi-tenant application.
can you tell us about what is the server specs
Sure, we currently have: - 1 Loadbalancer (4gb ram, 2 CPU) - 3 Application Servers (16gb ram, 8 CPU) - 1 MySQL database (db.m6g.2xlarge on AWS)
Very impressive. lots that's above my current level of understanding, but looks well thought out
Glad it was helpful!
like u get it
keep posting! best laravel videos out there right now what software do you use for the planning?
Thanks! I mainly use Notion & Figma.
Hi from Chile, This its so helpfull, thanks for sharing your expirience. This give so much clarity on doubts in my project, if you considerer do a how to build, something like this, but simpler it Will peak laravel development, again thanks you ❤
Thanks for the kind words! 🙏
how did you used laravel with websockets
I use a tool called Soketi, works great!
is it possible to use the stability api instead of replicate and instead of open ai the gemini api. If so, how difficult is it to change everything
Should be very easy to do this!
That "PHP quirk" you describe is really down to the Composer autoloader. Do `class_loader(\My\BrokenClass::class); class_loader(\My\BrokenClass::class);` (yes twice) when you've forgotten the namespace declaration inside `BrokenClass.php` and you'll see the get the cannot redeclare error from PHP. This happens because Composer includes the same file again even though it's already done so and the expected class was not declared within it. Personally Composer should be raising an error after the first load.
Interesting!
U are best programmer in the world man..
Don't know about that - but thanks 😅
What's your favorite PHP 8.4 feature?
Hi there! 👋
👀👋
Cool talk guys loving this.
Thx!
Looking for a written article about the high-level architecture of my point-of-sales app? Check it out: 👇 www.sabatino.dev/high-level-architecture-of-my-point-of-sales-app/
Very interesting! Would love a video about the offline-first setup and the hardware involved.
Thanks for the suggestion!
Broooo I wish I could be a part of this development Great work
Thx! 🙌
Interesting that you are able to combine react native with Vue and it works. No way you can use inertia.js for any of this right? Pretty cool what you have build out.
Yeah, thanks to NodeJS mobile we are just able to spin up an Express webserver, in which we load our Vue app - pretty neat! Inertia technically could work if you just use a webview and point to your cloud system, but running Inertia locally would require you to ship a PHP binary with your app. That's also not impossible, but would require a lot of effort to set up.
I need a favor / guideline regarding Web USB to direct print to thermal printers like you said from Chrome on Windows (https site). Can you guide me / share the sample code please ?
This is a random small demo tool I found that works pretty good clutter.ikuta.me/webusb-escpos-demo/ - look at the code there, it’ll help you 👍
What about using wireless printers to send print request from mobile app? It is not that easy how you showing and explaining everything it i can imagine the effort of you developing this kind of app
We do use wireless (wi-fi) printers, but from a 'secure context' (eg. pos.example.com) you cannot send an insecure request to a printer on your IP (eg. 192.168.1.200). This means we'd need to add SSL certificates to every printer and trust them on the device, which is actually more work unfortunately.
Nice tips. But I wonder why not just use flutter and use Laravel for backend.
Because we started as a fully web-based SPA, our component library has hundreds of custom components and has been in development for +4 years and we share this component library with all our other frontends (webshop, kiosk, ...). Adding Flutter into that mix means we have to basically start from scratch - and as I'm basically the only developer, this is not an option.
@sabatino-dev that makes total sense. I was just asking cause I've faced similar complications when it came to printing. Now I am actually thinking about rewriting the whole app using flutter and maybe Laravel for backend.
Oh! How did you wrap a Vue2 project into React Native bundle? Is it the node-mobile that runs the vue project? Or was that only for the printer module? ...Or simply, a webview? Also, why not use Capacitor? :)
Good question! I start an express server in NodeJS mobile that binds to port 9091, and in React Native I just have a Webview with localhost:9091 as its source. The Express server is just a static server: app.use(express.static('www'))
i have request please make a video on real time chat as of now laravel websocket package by beyond code is archived now .....make a video on how to achieve real time chat by using websocket..... i also have question does point of sale application on the tech stack you mentioned in video support offline version ...it means can we generate invoices without internet if we use desktop version windows
My point-of-sales app is hybrid - it can work offline entirely, but when internet is available it'll use our cloud infrastructure. Thanks for the suggestion about the real-time chat, will consider it! I'd use Soketi for websockets today.
This is awesome, you pretty much just use what works and thats great 🎉
Thank you! 😊
This is awesome, you pretty much just use what works and thats great 🎉
Thank you! 😊
Love it! You deserve much more followers. Keep up the good work, your videos are super interesting🚀
Thank you so much!
create a course on thing
I'm considering it!
What is the deployment process for your POS systems, are they use docker? Can you explain more about the system design? Appropriate for you to your helpful videos. ❤
We have a few Linux-based POS systems that are deployed using Docker indeed, but 85% is just an .exe we distribute to our merchants. Our POS is hybrid, so that means it can work without internet, but when possible, it’ll sync with our Laravel backend.
i need your help
For? 😊
@@sabatino-dev for code, as you are doing same that i need , can you share repo for your code
@@sabatino-dev free
yo, pretty cool video!
Glad you liked it!
❤❤
🙌
Hello again hope you are doing well, i just remembered the cache issue you faced here. Couple days ago i was adding a new cache strategy to a new project, and usually i do it as you made it cache:remember the usual way, but after debugging the queries turns out if 10 clients in the same second request the cache and its not in the cache or its in the cache there will be number of queries if its database based, and this is called cache stampede, to solve it must use cache lock strategy, simply locking the cache database request from one user and send the response to all users who requested the cache. Anybody can get the code from any ai tool but must understand the logic of it. Just wanted to state it incase anyone didnt know about it. This case happens when using database as cache driver, idk how its for redis
That's a great explanation, thanks! With the new Cache::flexible, you get the 'stale-while-revalidate' pattern straight in Laravel, which is also a welcome addition.
@@sabatino-dev Thank you! yes i did see it before but never checked it because its supposed to be beta just checked defer, but now after you told me about it i checked it, amazing work from laravel, and the difference in performance and code cleanace is amazing! thanks!
Awesome videos! Keep up the good work :)
Thanks, will do!
How does the log appear in browser console?
It is a CLI console, not a browser console
@sabatino-dev ah ok, lol
Shared database approach is very risky thing. Better not to use it, unless you are dealing with something that is not very important.
Not sure why you’d say that. Shared database is very popular and used by big players like Shopify, Stripe, OpenAI, Microsoft etc.
@@sabatino-dev It comes with lot of cons, if some tenant want to delete their full data from dB, it requires a lot of efforts to only delete their data, also migration from one dB to another in case client wants is very tedious, and if client want to access their dB then also its very tough job. Maybe you know more than me about multi-tenant apps, but these are some of the major difficulties for small organizations to overcome.
Have you ever tried livewire directly ? or plug filament into livewire component ? Would love to see how your optimize it :) Great video !
I only have some basic experience with livewire unfortunately. Thanks for watching!
What are your thoughts on relations & accessors on reports or pagination data? Eloquent with relation + accessors VS Query Builder with joins? Herd many times that laravel is fast and scaleable, but using Eloquent with rleations + accessors, very quickly becomes bottleneck. Very quickly At least when I tried, of course i found mistakes in how I managed it, but it was not intentional and obvious in start and was too late to notice. After a year of data the started collapsing in response time. from second to 10s of seconds
I try to avoid accessors as it's often a source of N+1 queries. Other than that - I do think you can keep Eloquent queries performant, but you need to take special care.
Guitars and Amps so close to the kitchen sink? I hope this background is AI generated!
It’s an office/studio with a small sink next to the coffee machine 😉 No AI involved 👀
honestly, I don't understand what's going on. looks cool, though.
Thanks for the feedback!
Hi , thank for sharing your amasing automations , how do you automate the creation database ? or do you use , a big database for all the tenant ?
We have a single database for all our tenants, I explain it in detail here: ua-cam.com/video/Lmope5CdM10/v-deo.html
Thank you, I really enjoyed the simplicity of your explanations and your pace. One very novice question: how would you interact with the model if you want to have a "conversation-like" with it? meaning it is going to be fed with inputs that reply to its latest output, and now the model needs to reply that new input taking in account the messages history, do you just wrap the whole thing in the prompt each time you feed it to the model?. Maybe I just need to read more about it, feel free to just feed me with an article or something :p. Thank you very much man!
Thanks! To achieve history you indeed need to send the entire history all the time.
how do you keep your queries fast for the mechant reports?
I do a deepdive in this video: ua-cam.com/video/3CCwxLS8cB8/v-deo.html
Man your multi tenant project and app development is really crazy. your all videos based on real time project which give more ideas and how to manage your tenants. Loved it.
Glad you like them! Really nice to hear!
Very cool! This is incredible fast
Thanks 🙏 still looking to shave off some time where I can haha
Sabatino this is wild! Let's connect directly. Would love to hear more about this project.
Thanks for reaching out! You can mail me at masalasabatino@gmail.com
Pretty cool! 😏
Thx! 🙌
Thank you very much for sharing 🤗 Might I suggest that you quickly show the app in the beginning 💡
Thanks for the tip! I might do a deepdive into our template with a bit more details if there is interest!
@@sabatino-dev am interested! I'm going from a QA to learning React Native and would love to see how you work! Subbed!
Great man, finally i am watching someone talking about advanced optimization in Laravel
Thanks! 🙏
i just started running into this problem . I will migrate to drizzle asap :D .. its almost as nice .. a little bit more verbose but for electron this will save alot of headaches :D
it does not have the problem of requireing these binaries ... really a red flag if you have to dig into node modules at runtime :D
Nice! Will have to look into drizzle 😉