For those who don't write models in English, remember to implement the HasName interface in the Tenant model, in this example in the Company model, example in Spanish we say nombre, so hope it helps someone.
Wow, excellent explanation! Thank you very much for addressing this topic which, as you said, is very broad. By the way, congratulations on the Filament v3 course. Since you said you should go deeper, I would suggest, if possible, that you explain how we would use uuid to identify the tenant instead of the usual id. 😊
Thank you for the brilliant explanation 👍. Just to clarify, should I include user_id or company_id in every table to filter records by user or company? 🤔
We have this article about it: "Filament: Disable Dashboard and Auto-Redirect to URL After Login" laraveldaily.com/post/filament-disable-dashboard-auto-redirect-url-after-login
@@rmitesh32 I implemented the spatie permission package with it. In every panel, you need to add the middleware. Just define your roles and permissions. Then apply the way you add the middleware to route or controller
Hello, I'm making a multi tenancy project that includes the user and province tables of the pivot table was province_user when I created a user province_user doesn't have a newly created user record i.e user_id and. province_id. How to do that? I mean users created but not linked with the province in the province_user table in your case company_user how this table has newly created userid with companyid value.
i am working with a team and user and i have made a team_user table when the user was created by admin the pivot table can't get new records it will only create a new record in the users table but we need the users table as well as the pivot table. How to fix
Take a look at the attach action, you can add form values. For example, I added phone numbers in the pivot for a support team, so support team can serve multiple clients. When attached to a client a custom number is added to pivot. That may be more advanced than you need but I think the concept is there. In the model withPivot and add a form with attach, and if needed custom logic with attachAction
Excellent video, but speaking of how to do this type of thing correctly, is multi-tenancy really better than having separate databases per company? It is okay to have all the records of different companies in the same database and in the same tables?
There's no "better", that's what I meant in the video that different people choose different tenancy. Separate databases make sense if you have legal requirements for this, or individual changes for companies. But for managing code and doing data migrations, separate databases is a nightmare.
@@LaravelDaily I use fresh installation laravel with filament 3. I following step by step getting started in filament docs with make CRUD function. I feel laggy, difference between basic function CRUD laravel. But i dont know, maybe my laptop is so bad 🫣
Год назад
@@ArislanHaikal I use fresh installation on mac m1 pro... with database in docker. Everything is good.
For those who don't write models in English, remember to implement the HasName interface in the Tenant model, in this example in the Company model, example in Spanish we say nombre, so hope it helps someone.
Wow, excellent explanation! Thank you very much for addressing this topic which, as you said, is very broad. By the way, congratulations on the Filament v3 course. Since you said you should go deeper, I would suggest, if possible, that you explain how we would use uuid to identify the tenant instead of the usual id. 😊
As always, very well explained 👍
thanks you sir ,it's helpful
multi-tenancy is a big term and i am loving this new filament. got anyways to quickly migrate to filament from nova. i am still stuck with nova 3
There's no "quickly migrate" unfortunately :)
Thank You Teacher!
Thank you for the brilliant explanation 👍. Just to clarify, should I include user_id or company_id in every table to filter records by user or company? 🤔
Yes
Can i ask a question? How to make colspan in fillament? Can i get the tutor?
Hello professor, how to make a widget that displays different data in multi tenancy, please help. Thank You
I hope you reply to this message
Please help, how to call widgets based on data in multi tenancy
Please ask that on the official discord of Filament, I'm on vacation at the moment
Welcome to Filament PHP
Hello sir, I want to ask, an easy way to change the default navigation such as DASHBOARD. For example, dashboard text changes to monitoring
We have this article about it: "Filament: Disable Dashboard and Auto-Redirect to URL After Login" laraveldaily.com/post/filament-disable-dashboard-auto-redirect-url-after-login
How would you handle subdomains/domains in this without additional tenancy packages?
Currently Filament doesn't support subdomains or domains as tenants, from what I understand.
Thanks for the explanation, Cheers 🥂
One question: can we remove company ID from the URL for the current tenant and do configurations from the code?
I don't think so, at the moment, at least I haven't seen it in the docs. How else would you decide the tenant if not from URL? Session?
@@LaravelDaily Yes, does we can use Spatie's roles and permissions Team feature concept?
setPermissionsTeamId() ?
I don't think it's possible, but you can ask on the discord or make a pull request with your suggestions
@@rmitesh32 I implemented the spatie permission package with it. In every panel, you need to add the middleware. Just define your roles and permissions. Then apply the way you add the middleware to route or controller
Hello Instructor, How to implement domain or sub domain in filament mutli tenancy?
From what I've read in the docs, they don't have that feature at the moment
@@LaravelDaily So,What other ways can I do to integrate with the domain?
Don't use Filament multi-tenancy, built your own tenancy or use some other package like archtechx/tenancy
How could I create a settingspage with tabs?
A topic for a separate video one day, not something I can answer in a short comment
Hello, I'm making a multi tenancy project that includes the user and province tables of the pivot table was province_user when I created a user province_user doesn't have a newly created user record i.e user_id and. province_id. How to do that? I mean users created but not linked with the province in the province_user table in your case company_user how this table has newly created userid with companyid value.
I guess you need to read this section of the docs about multi-tenancy: filamentphp.com/docs/3.x/panels/tenancy#adding-a-tenant-registration-page
i am working with a team and user and i have made a team_user table when the user was created by admin the pivot table can't get new records it will only create a new record in the users table but we need the users table as well as the pivot table. How to fix
Sorry I can't debug or write this custom code for you, it's an individual question that is impossible to answer in a comment.
Take a look at the attach action, you can add form values. For example, I added phone numbers in the pivot for a support team, so support team can serve multiple clients. When attached to a client a custom number is added to pivot. That may be more advanced than you need but I think the concept is there. In the model withPivot and add a form with attach, and if needed custom logic with attachAction
Excellent video, but speaking of how to do this type of thing correctly, is multi-tenancy really better than having separate databases per company? It is okay to have all the records of different companies in the same database and in the same tables?
There's no "better", that's what I meant in the video that different people choose different tenancy. Separate databases make sense if you have legal requirements for this, or individual changes for companies. But for managing code and doing data migrations, separate databases is a nightmare.
Why people love filament? I don't like filament, because it's too slow. Any suggestion to speed up this? 😢
disable debugbar views if added. Not sure why it is slow.
What exactly is slow? Which functions? How do you measure slow? And yes, are you using debugbar, as the other comment says?
@@LaravelDaily I use fresh installation laravel with filament 3. I following step by step getting started in filament docs with make CRUD function. I feel laggy, difference between basic function CRUD laravel. But i dont know, maybe my laptop is so bad 🫣
@@ArislanHaikal I use fresh installation on mac m1 pro... with database in docker. Everything is good.