Тёмный

Adding multi tenancy to an existing Laravel web application 

Kompute’s Edge
Подписаться 1,1 тыс.
Просмотров 29 тыс.
50% 1

Опубликовано:

 

1 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 78   
@Sop7anaAllah
@Sop7anaAllah 2 года назад
Thank you for this great video How to setup database connections if the Saas software is separate from landlord app? I mean there is no tenant moderation from the Saas app, there will be a separate app to manage tenants. What will be the settings in the Saas app and Landlord app. And can you provide source codes for your tuts. 1 more thing, can you please explain how to do it with multiple mysql DBs?
@kedotdev
@kedotdev 2 года назад
Hey! You have a bunch of questions here, so let me try to answer each point here: > How to setup database connections if the Saas software is separate from landlord app? You will need to have the landlord app included in your design, even if you don't use it directly. This tutorial is great, because you can take almost ANY application and convert it to be tenant-based. Even if you don't need the front-end for the Landlord application you will still need the backend/middleware logic the Landlord provides. For example, consider this: 1. You have 2 tenants. Tenant A and Tenant B. 2. When a user requests Tenant A or Tenant B, the request is first made to the Landlord app 3. The landlord determine if the tenant exists 4. The landlord then routes the request appropriately. So the landlord component (aka the "central domain") is pretty important. > I mean there is no tenant moderation from the Saas app, there will be a separate app to manage tenants. Answer: That's fine too! I've used strict CLI to manage my tenants. > What will be the settings in the Saas app and Landlord app. Answer: Can you explain what you mean or what you are trying to achieve here? > And can you provide source codes for your tuts. 1 more thing, can you please explain how to do it with multiple mysql DBs? Answer: I would love to. It will take me some time to prepare this, but it's a great idea.
@seifeddinejandoubi1880
@seifeddinejandoubi1880 Год назад
Hello, nice video. One question, im trying to implement this into an application that is fully implemented using extemsions and concord. And im having difficulties doing so. Any advice?
@duzadam9980
@duzadam9980 Месяц назад
I can't understand. Why are you adding each tenant and changing the .env and config file? Doesn't the tenancy framework do that for you?
@oscarcontreras7848
@oscarcontreras7848 2 года назад
Hi How can I find Multitenancy with spatie and for MySql ?
@simarpreetsingh6604
@simarpreetsingh6604 2 года назад
Hi Mike. Where do I run those initial installation commands? I'm using putty for SSH
@kedotdev
@kedotdev 2 года назад
Because I am developing locally, i run them in my Mac terminal. Are you on a Mac or Windows? If you are on Windows, checkout WSL. If you are on a Mac, simply search for Terminal in your Application Utilities folder.
@SharkFaceKilla
@SharkFaceKilla 2 месяца назад
This is great, but how do you use it??
@yaesmucho
@yaesmucho Год назад
Wait what, really? I can deploy multi tenancy service this fast? Is that video what I think it is...
@ripon59
@ripon59 5 месяцев назад
Mike, Can you please create a quick video to use Single DB plz?
@tomjerry-nx9dl
@tomjerry-nx9dl Год назад
this is the right video i was finding for tenancy and by the way you look like ben affleck batman.
@AcmeDevelopers
@AcmeDevelopers Год назад
Hi mike, excellent video, I am not understanding the use of tenancy_tenants database, can you please explain? And also I am getting 'Class "app\Tenant" not found' error for 'php artisan tenants:migrate' command My 'Tenant' model is in the app folder and in the tenancy.php config mentioned ''tenant_model' => \app\Tenant::class,' Please help. Thank you.
@EduardoWeidmanBarijan
@EduardoWeidmanBarijan Год назад
When I saw existing application I thought you would show how to configure this package in an already developed application. The challenge is to modify a single user app to a multi tenancy one. Sure the video helps to configure using Postgres and all, but it is not on an existing app
@vmooscode9959
@vmooscode9959 2 года назад
hello mike, am really cannot find words to thank you for clearing my vision and my thoughts about multi-tenancy, please please please keep on helping us with your great explanation way.
@kedotdev
@kedotdev 2 года назад
Thank you for the kind words! I will try my best to continue making videos that solve real word problems :)
@vmooscode9959
@vmooscode9959 2 года назад
@@kedotdev what happend mike ? why you stopped making new videos ? am very confused, u have needed skills and you don't use it !!!
@kedotdev
@kedotdev 2 года назад
@@vmooscode9959 Thanks for checking in :) I'm actively trying to make some more content. I have some great ideas... but I just need to find the time. Hang tight... :)
@taolao3595
@taolao3595 Год назад
Can you share a video about spatie permission with team function. Thank you.
@Sop7anaAllah
@Sop7anaAllah 2 года назад
Am I your 1st subscriber? 😃
@kedotdev
@kedotdev 2 года назад
Not quite. But you will always have a special place in my heart. Thanks for subscribing!
@skmdbadruduja7402
@skmdbadruduja7402 Год назад
hi Mike, how to create multiple schema in mysql ?
@NicolasEzequielAlmonacid
@NicolasEzequielAlmonacid 6 месяцев назад
Config livewire ?
@asyrafdeveloper7134
@asyrafdeveloper7134 2 года назад
Hi mike. I have stand alone HR web app. Can i implement multi tenancy to my existing HR web app? Or there is something that i need to know first. thank you. great video.
@kedotdev
@kedotdev 2 года назад
Hey! Yes, you should be able to implement multi tenancy in an existing app. Professionally, I build my apps first and then add multi-tenancy when I’m done.
@hitorianimation6801
@hitorianimation6801 2 года назад
Could you make tutorial about centralized login (SSO) like login with this tenancy package, and integrated to auth package such jetstream/fortify, breeze, or others? thanks..
@kedotdev
@kedotdev 2 года назад
Tenancy doesn’t play nice with some of the Laravel auth scaffolding. I’ll see what I can do here :) What do you use for SSO? Something like Google, Facebook, etc? Or more like Azure, LDAP, etc?
@hitorianimation6801
@hitorianimation6801 2 года назад
@@kedotdev I mean not use SSO like google or something, just SSO-like. login from Central with normal user and password, and then redirected to tenant where the user belong to. I dont have the logic yet how its work.. very helped if you can make tutorial about it. :)
@PauloPinto79
@PauloPinto79 2 года назад
Mike, so you are saying, if I have already a project in Laravel, with just one admin user, using this package, I can create a SaaS.?
@kedotdev
@kedotdev 2 года назад
Sure. I usually add my tenancy towards the end.
@PauloPinto79
@PauloPinto79 2 года назад
@@kedotdev Amazing, thanks.
@darlleybrito4198
@darlleybrito4198 2 года назад
✅✅
@fernandomontero4568
@fernandomontero4568 Год назад
Hi, I hope that somebody help me, how can I connect a view which I made previously of the integration of tenancy, With my tenancy ? I hope my question is clear
@kedotdev
@kedotdev Год назад
Are you saying you want to make a view available to a tenant?
@fernandomontero4568
@fernandomontero4568 Год назад
@@kedotdev I have a login page in my resource/view folder, how I can display in my acme.test my login page?
@fernandomontero4568
@fernandomontero4568 Год назад
@@kedotdev I mean, where did you take “it’s work” page? And how you display it?
@kasunsampathadhikari6833
@kasunsampathadhikari6833 Год назад
Thanks for this Great one.
@kedotdev
@kedotdev Год назад
Glad you enjoyed it
@stevenlevittt
@stevenlevittt 2 года назад
Thank you for the wonderful video. Which software is that on 1:15
@kedotdev
@kedotdev 2 года назад
Lucidcharts
@v3ct0r76
@v3ct0r76 2 года назад
Are you using apache or nginx? I can't run it on apache.
@kedotdev
@kedotdev 2 года назад
What happens on Apache? You will need to setup a vhost that supports multiple domains, or disable vhosts completely.
@mileidyaular3357
@mileidyaular3357 2 года назад
Hi mike, excellent video always innovating. I need to ask you a question recently, I assumed that a security project would be the access control center for different applications, the system would manage the access permissions of each user to the different systems that are created on the server. What I can't figure out is how to handle route permissions for roles and groups from different systems in a single centralized application. I have handled the tenancy option, but still don't know how to fix it. how the security system can see the routes or access them
@kedotdev
@kedotdev 2 года назад
Mileidy, how about using Guards? Look into a permissions package like Spatie Permissions.
@PFE-cj4cq
@PFE-cj4cq 2 года назад
great job mik plz can you give me the steps to follow "chart" or practical guide "reference" to switch from a single-tenant SaaS to multi-tenant SaaS thank you
@kedotdev
@kedotdev 2 года назад
Are you using Laravel currently? Would you be interested in me making a video converting your single tenant app to a multi tenant one?
@noureddinehattab4015
@noureddinehattab4015 2 года назад
@@kedotdev yes i am interested
@simarpreetsingh6604
@simarpreetsingh6604 2 года назад
@@kedotdev Yes that would be awesome!! :)
@zackanimatestudios
@zackanimatestudios 2 года назад
This is Amazing Mike
@kedotdev
@kedotdev 2 года назад
Thanks for watching!
@stevebraintv
@stevebraintv 2 года назад
Hi Mike Thanks for this Great one. Please can you drop a Tut for Mysql workaround? I already have a working application in mysql and would like to keep it that way. I will also try following through first with this and see if I can replicate this in Mysql until you are able to drop it Thanks once again.
@kedotdev
@kedotdev 2 года назад
Hey there! I plan on doing a MySQL multi-tenant video very soon. Thanks for the request.
@stevebraintv
@stevebraintv 2 года назад
@@kedotdev Hi, Do you have update as whe n this can be ready?
@hamisukimson7458
@hamisukimson7458 Год назад
hello mike thanks for the tutorial, any update on Mysql version please
@kedotdev
@kedotdev Год назад
It’s coming :) I needed an additional medium to help explain my thoughts and ideas. I have a website launching soon and then I’ll tackle MySQL and include some written resources to assist :)
@kedotdev
@kedotdev Год назад
Hey, do you have a MySQL app ready? If you want, I would like to do a live video converting your app to support multi tenancy. I can keep your app source private and scrub any additional details as needed. If you are interested, let me know!
@Sop7anaAllah
@Sop7anaAllah 2 года назад
Please make a video on how to do it with multiple MySql databases ASAP. Thank you
@kedotdev
@kedotdev 2 года назад
I’ll work on this. But it might take me some time :) weeks perhaps.
@manuelgrossenbacher826
@manuelgrossenbacher826 Год назад
@@kedotdev This will be awesome. Good work!
@trojean.cedric
@trojean.cedric 11 месяцев назад
Love it thanks to you.
@KuroUsagi1010
@KuroUsagi1010 2 года назад
Hi, what is the software you used for the diagrams / flowcharts?
@kedotdev
@kedotdev 2 года назад
I use Lucid Charts.
@christostsangaris4785
@christostsangaris4785 2 года назад
Nice one Mike! Just a question: whats the difference between multiple Databases and multiple Schemas? Why did you go with multiple Schemas? Thanks
@kedotdev
@kedotdev 2 года назад
A schema is just another way to organize information within a data structure. Because I want to organize the tenants separately within a single database, schemas work out the best for me. Although I did debate whether or not to use multiple databases within a single database server, I chose schemas to make database backups, restoration, and cross-schema queries simple (without having to span multiple database connections). In practice, aside from organization, whether you use schemas or multiple databases, the overall administration and setup is very similar. Aside from organization and preference I can’t think of a definitive reason to use one over the other. :)
@christostsangaris4785
@christostsangaris4785 2 года назад
@@kedotdev thanks for the clarification! Multitenancy needs more videos like this, as its a topic not many touch. Thank you!
@planchet2013
@planchet2013 Год назад
thank you a lot
@projectsaathi5588
@projectsaathi5588 2 года назад
Just WOW 👌 , nice explanation
@kedotdev
@kedotdev Год назад
Thank you :)
@hafizhfadhlurrohman1760
@hafizhfadhlurrohman1760 2 года назад
Hi, thanks for making this great tutorial
@kedotdev
@kedotdev 2 года назад
I’m glad you enjoyed it.
@hafizhfadhlurrohman1760
@hafizhfadhlurrohman1760 2 года назад
@@kedotdev i have question, do you setup the database first? like the "pg_landloard" database and the template to?
@kedotdev
@kedotdev 2 года назад
You need to make sure Landlord and Tenant databases exist within your database server. Assuming they do, and assuming your config roughly matches mine, then you now have two migration commands. `php artisan migrate` will create your Landlord tables. `php artisan tenants:migrate` will create your Tenant tables in their respective schemas.
@hafizhfadhlurrohman1760
@hafizhfadhlurrohman1760 2 года назад
@@kedotdev on the landlord database did u have user table? in second tutorial i can't make filament user because i don't have user table on landloard database
@kedotdev
@kedotdev 2 года назад
You can copy the same users migration table from then tenants folder into the base migrations folder. Both platforms can use the same migration. Great question.
@emreerel7041
@emreerel7041 2 года назад
tnx mike its great
@emreerel7041
@emreerel7041 2 года назад
subscribed :)
@kedotdev
@kedotdev 2 года назад
Thank you :)