Thank u for tutorial I want to use multi tenancy but instead of subdomain i want it to be passed through property code (tenant code) And when user want to logged in he should beside login and password add property code as well
Great video as always Josh! 👏 I recently wrote a guide on the same topic but used the Neon Serverless Postgres product for the database side of things!
Hi! I'm working on a multi-tenant Laravel 10 app with a database-per-tenant setup and a central database for admins and tenant management. I can add tenants and link their domains successfully, and user registrations work by storing data in the correct tenant databases. However, when I log in with tenant user credentials, the app logs me in as the central admin instead of as a tenant user. I'm using separate models and guards for Admin and User. Any ideas on how to resolve this issue?
the idea of multi db's sounds good on paper, but all I can think about is the hassle it would be to maintain/migrate/sync each individual database when you end up with millions 😅 *same considerations applies to NoSQL databases when you interact with single documents rather than tables.
True. Maybe not great in every application. 1. I think that’s where Turso shines to help out with that with the parent child schema. The Tenancy package also has some great tenant migration features. 2. I think multi DB is great for sell-once software that you can kind of sell and then no longer have to manage. But agreed that it has advantages and disadvantages. And multitenancy in a single database works for most usecases. ☺️
If you had to pick another services similar to turso but for mysql or postgres? do you have any opinion on that? Most of the stuff that I found for both of those databases are extremely expensive to have has a multi-database setup. One of the things I thought about doing is to find a way to have it split. Any customer that would be in lower plan would be on a single mysql database multi-tenant (or sqlite with turso) and any other client that would be on a high plan would be on a independent db. but not sure how to do that. and that would have to handle migrations between plans.
I was using PlanetScale a while back in another project... and the prices for a single mysql instance... that was standing there without doing anything... were absurd. Doing the same... for a multi-database...
lmao I've been building a chat app in which users can buy sites and launch it with their own themes and default settings I NEVER KNEW it was called so and I'm following a similar approach of multiple databases and multiple domains and multiple projects on vercel to manage environment variables for my users Although I had many take aways from this project, most importantly: starting with mult-tenancy architecture in mind makes building much easier and refactoring much less often I fukin hate my life tryna maintain this project I think I might to make a big refactor to fix it all!
Great video, but what if I don't use livewire and I'm looking to identify tenants by path in single somain, can't find anything related... Single domain, múltiple db, tenants divided by path: MyDomain/tenant1/login MyDomain/tenant2/login
i am tinkering around with policies in laravel today and i wanted to know how would i implement a "regular" and admin user accounts ? my current approach is just a "role" field in my model and a selection in my sign up form then i created a policy for my tickets to check if the user role is admin and that works as expected my question is : is this the proper way ? could my approach be improved ?
I made this video on the official Laravel Channel for a quick primer on how you would implement that. That would be a good follow-up. Basically with having separate databases, you have the ability to have "roles" where then each role would have their own gate. Of course, adding a package to help with this is a good way to make it happen too. :) ruclips.net/video/NXt5XqyaaNE/видео.html
Cool to see more on Turso and Laravel
Interesting, by far this was the most unusual way to use "Tenancy for Laravel". Good video!
Thank u for tutorial
I want to use multi tenancy but instead of subdomain i want it to be passed through property code (tenant code)
And when user want to logged in he should beside login and password add property code as well
High quality content as always!!! Thanks for sharing your knowledge !!
Please bring A Complete series of SaaS Application.
Great video as always Josh! 👏
I recently wrote a guide on the same topic but used the Neon Serverless Postgres product for the database side of things!
Great content. Thanks Josh.
BTW how to get all the users from all the db of a multi tenant app?
the best way, to use synced resources in tenancy for laravel. and sync all users to your central db
What a perfect Video Josh!!! Damn it...
Thank YOU for all you do! ☺️
Respect from Pakistan 🇵🇰 ❤
Hi! I'm working on a multi-tenant Laravel 10 app with a database-per-tenant setup and a central database for admins and tenant management. I can add tenants and link their domains successfully, and user registrations work by storing data in the correct tenant databases. However, when I log in with tenant user credentials, the app logs me in as the central admin instead of as a tenant user. I'm using separate models and guards for Admin and User. Any ideas on how to resolve this issue?
the developer mode is it a plugin on browser that show you current root or what are u using ?
the idea of multi db's sounds good on paper, but all I can think about is the hassle it would be to maintain/migrate/sync each individual database when you end up with millions 😅
*same considerations applies to NoSQL databases when you interact with single documents rather than tables.
True. Maybe not great in every application.
1. I think that’s where Turso shines to help out with that with the parent child schema. The Tenancy package also has some great tenant migration features.
2. I think multi DB is great for sell-once software that you can kind of sell and then no longer have to manage.
But agreed that it has advantages and disadvantages. And multitenancy in a single database works for most usecases. ☺️
@@joshcirre "sell-once software", so its not good for SaaS?
If you had to pick another services similar to turso but for mysql or postgres? do you have any opinion on that? Most of the stuff that I found for both of those databases are extremely expensive to have has a multi-database setup.
One of the things I thought about doing is to find a way to have it split. Any customer that would be in lower plan would be on a single mysql database multi-tenant (or sqlite with turso) and any other client that would be on a high plan would be on a independent db. but not sure how to do that. and that would have to handle migrations between plans.
I was using PlanetScale a while back in another project... and the prices for a single mysql instance... that was standing there without doing anything... were absurd. Doing the same... for a multi-database...
thanks, its helpful.
Where is the complete course? please.
lmao I've been building a chat app in which users can buy sites and launch it with their own themes and default settings
I NEVER KNEW it was called so
and I'm following a similar approach of multiple databases and multiple domains and multiple projects on vercel to manage environment variables for my users
Although I had many take aways from this project, most importantly: starting with mult-tenancy architecture in mind makes building much easier and refactoring much less often
I fukin hate my life tryna maintain this project I think I might to make a big refactor to fix it all!
Thanks for watching. That’s a good takeaway, it is incredibly easier if you know that’s how you’ll build it from the start!
Great video, but what if I don't use livewire and I'm looking to identify tenants by path in single somain, can't find anything related... Single domain, múltiple db, tenants divided by path:
MyDomain/tenant1/login
MyDomain/tenant2/login
need video obs configuration!!!!!!
is so pretty config!
Thank you! I’m planning on doing a video about that soon. ☺️
What plugin are you using to hide the tailwind class names by default?
This is the Tailwind Fold plugin. :)
Bro sent too much traffic to Turso 😁
i am tinkering around with policies in laravel today and i wanted to know how would i implement a "regular" and admin user accounts ? my current approach is just a "role" field in my model and a selection in my sign up form then i created a policy for my tickets to check if the user role is admin and that works as expected
my question is : is this the proper way ? could my approach be improved ?
Roles (and simpler form of them ex. Boolean Field isAdmin) is the best choice.
but how to add role to the users and what they can do
I made this video on the official Laravel Channel for a quick primer on how you would implement that. That would be a good follow-up.
Basically with having separate databases, you have the ability to have "roles" where then each role would have their own gate.
Of course, adding a package to help with this is a good way to make it happen too. :)
ruclips.net/video/NXt5XqyaaNE/видео.html
Very interseting topic for me...😅
Too bade libsql is not supported for windows.
Use WSL, all web developers should be. You don't deploy the windows so you don't develop on windows.