Adding multi tenancy to an existing Laravel web application

  Рет қаралды 30,022

Kompute’s Edge

Kompute’s Edge

Күн бұрын

Пікірлер: 79
@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... :)
@tomjerry-nx9dl
@tomjerry-nx9dl Жыл бұрын
this is the right video i was finding for tenancy and by the way you look like ben affleck batman.
@chanu1993
@chanu1993 2 ай бұрын
Do you have a video to do this on MySQL with multiple databases please ?
@kasunsampathadhikari6833
@kasunsampathadhikari6833 2 жыл бұрын
Thanks for this Great one.
@kedotdev
@kedotdev 2 жыл бұрын
Glad you enjoyed it
@zackanimatestudios
@zackanimatestudios 2 жыл бұрын
This is Amazing Mike
@kedotdev
@kedotdev 2 жыл бұрын
Thanks for watching!
@projectsaathi5588
@projectsaathi5588 2 жыл бұрын
Just WOW 👌 , nice explanation
@kedotdev
@kedotdev 2 жыл бұрын
Thank you :)
@oscarcontreras7848
@oscarcontreras7848 2 жыл бұрын
Hi How can I find Multitenancy with spatie and for MySql ?
@taolao3595
@taolao3595 Жыл бұрын
Can you share a video about spatie permission with team function. Thank you.
@trojean.cedric
@trojean.cedric Жыл бұрын
Love it thanks to 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.
@NicolasEzequielAlmonacid
@NicolasEzequielAlmonacid 9 ай бұрын
Config livewire ?
@skmdbadruduja7402
@skmdbadruduja7402 Жыл бұрын
hi Mike, how to create multiple schema in mysql ?
@SharkFaceKilla
@SharkFaceKilla 5 ай бұрын
This is great, but how do you use it??
@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?
@ripon59
@ripon59 8 ай бұрын
Mike, Can you please create a quick video to use Single DB plz?
@hamisukimson7458
@hamisukimson7458 2 жыл бұрын
hello mike thanks for the tutorial, any update on Mysql version please
@kedotdev
@kedotdev 2 жыл бұрын
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 2 жыл бұрын
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 жыл бұрын
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.
@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.
@stevenlevittt
@stevenlevittt 2 жыл бұрын
Thank you for the wonderful video. Which software is that on 1:15
@kedotdev
@kedotdev 2 жыл бұрын
Lucidcharts
@fernandomontero4568
@fernandomontero4568 2 жыл бұрын
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 2 жыл бұрын
Are you saying you want to make a view available to a tenant?
@fernandomontero4568
@fernandomontero4568 2 жыл бұрын
@@kedotdev I have a login page in my resource/view folder, how I can display in my acme.test my login page?
@fernandomontero4568
@fernandomontero4568 2 жыл бұрын
@@kedotdev I mean, where did you take “it’s work” page? And how you display it?
@duzadam9980
@duzadam9980 5 ай бұрын
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?
@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.
@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!
@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!! :)
@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.
@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.
@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!
@KuroUsagi1010
@KuroUsagi1010 2 жыл бұрын
Hi, what is the software you used for the diagrams / flowcharts?
@kedotdev
@kedotdev 2 жыл бұрын
I use Lucid Charts.
@planchet2013
@planchet2013 Жыл бұрын
thank you a lot
@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.
@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.
@emreerel7041
@emreerel7041 2 жыл бұрын
tnx mike its great
@emreerel7041
@emreerel7041 2 жыл бұрын
subscribed :)
@kedotdev
@kedotdev 2 жыл бұрын
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
@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!
@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?
@yaesmucho
@yaesmucho Жыл бұрын
Wait what, really? I can deploy multi tenancy service this fast? Is that video what I think it is...
@darlleybrito4198
@darlleybrito4198 2 жыл бұрын
✅✅
Multi-tenant Architecture for SaaS
11:07
CodeOpinion
Рет қаралды 126 М.
VIP ACCESS
00:47
Natan por Aí
Рет қаралды 30 МЛН
1% vs 100% #beatbox #tiktok
01:10
BeatboxJCOP
Рет қаралды 67 МЛН
Building a Multi-Tenant (Multi-DB) Project in Laravel with Turso
31:04
Multi-Tenant SaaS Architecture (Next.js Auth)
22:57
ByteGrad
Рет қаралды 32 М.
Multi-tenancy in Laravel
1:24:05
JustSteveKing
Рет қаралды 9 М.
Multitenancy in Laravel: Migrations, Testing, and switching tenants
12:02
4 Packages You Need in ANY Laravel Project
8:14
Laravel Daily
Рет қаралды 62 М.
Laravel, Django, Next.js ... which framework would I use for building a SaaS?
11:35
Maximilian Schwarzmüller
Рет қаралды 35 М.