NEW in Filament 3: Multi-Tenancy

Поделиться
HTML-код
  • Опубликовано: 8 авг 2023
  • Presenting another new feature of Filament 3.
    - Official docs of Multi-Tenancy: filamentphp.com/docs/3.x/pane...
    - My course "Filament 3 From Scratch: Practical Course": laraveldaily.com/course/filam...
    - My course "Laravel Multi-Tenancy: All You Need To Know" laraveldaily.com/course/larav...
    - - - - -
    Support the channel by checking out my products:
    - My Laravel courses: laraveldaily.com/courses
    - Laravel QuickAdminPanel: quickadminpanel.com
    - Livewire Kit Components: livewirekit.com
    - - - - -
    Other places to follow:
    - My weekly Laravel newsletter: us11.campaign-archive.com/hom...
    - My personal Twitter: / povilaskorop
  • ХоббиХобби

Комментарии • 41

  • @michabbb
    @michabbb 11 месяцев назад +3

    As always, very well explained 👍

  • @Claudio_Pereira
    @Claudio_Pereira 11 месяцев назад +4

    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. 😊

  • @carlosescobar5995
    @carlosescobar5995 11 месяцев назад +9

    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.

  • @jailsoncarneiro4936
    @jailsoncarneiro4936 8 месяцев назад

    Thank You Teacher!

  • @realanmup
    @realanmup 11 месяцев назад +2

    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

    • @LaravelDaily
      @LaravelDaily  11 месяцев назад

      There's no "quickly migrate" unfortunately :)

  • @christmex4540
    @christmex4540 11 месяцев назад +2

    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? 🤔

  • @wakathepublic
    @wakathepublic 10 месяцев назад

    Can i ask a question? How to make colspan in fillament? Can i get the tutor?

  • @ivanvalera7923
    @ivanvalera7923 11 месяцев назад

    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?

    • @LaravelDaily
      @LaravelDaily  11 месяцев назад +6

      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.

  • @rmitesh32
    @rmitesh32 11 месяцев назад

    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?

    • @LaravelDaily
      @LaravelDaily  11 месяцев назад

      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?

    • @rmitesh32
      @rmitesh32 11 месяцев назад

      @@LaravelDaily Yes, does we can use Spatie's roles and permissions Team feature concept?
      setPermissionsTeamId() ?

    • @LaravelDaily
      @LaravelDaily  11 месяцев назад

      I don't think it's possible, but you can ask on the discord or make a pull request with your suggestions

    • @networkerdesign6147
      @networkerdesign6147 7 месяцев назад

      @@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

  • @MikdanJey
    @MikdanJey 11 месяцев назад +1

    Welcome to Filament PHP

  • @duniamanji23
    @duniamanji23 10 месяцев назад

    Hello sir, I want to ask, an easy way to change the default navigation such as DASHBOARD. For example, dashboard text changes to monitoring

    • @LaravelDaily
      @LaravelDaily  10 месяцев назад

      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

  • @DeTechDivus
    @DeTechDivus 11 месяцев назад

    How would you handle subdomains/domains in this without additional tenancy packages?

    • @LaravelDaily
      @LaravelDaily  11 месяцев назад +1

      Currently Filament doesn't support subdomains or domains as tenants, from what I understand.

  • @user-hk8yr6xt2o
    @user-hk8yr6xt2o 10 месяцев назад +1

    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

    • @user-hk8yr6xt2o
      @user-hk8yr6xt2o 10 месяцев назад

      Please help, how to call widgets based on data in multi tenancy

    • @LaravelDaily
      @LaravelDaily  10 месяцев назад

      Please ask that on the official discord of Filament, I'm on vacation at the moment

  • @rishharris8808
    @rishharris8808 11 месяцев назад

    How could I create a settingspage with tabs?

    • @LaravelDaily
      @LaravelDaily  11 месяцев назад

      A topic for a separate video one day, not something I can answer in a short comment

  • @user-ml6el6ne2s
    @user-ml6el6ne2s 11 месяцев назад

    Hello Instructor, How to implement domain or sub domain in filament mutli tenancy?

    • @LaravelDaily
      @LaravelDaily  11 месяцев назад

      From what I've read in the docs, they don't have that feature at the moment

    • @user-ml6el6ne2s
      @user-ml6el6ne2s 11 месяцев назад

      @@LaravelDaily So,What other ways can I do to integrate with the domain?

    • @LaravelDaily
      @LaravelDaily  11 месяцев назад

      Don't use Filament multi-tenancy, built your own tenancy or use some other package like archtechx/tenancy

  • @sabinmagar4152
    @sabinmagar4152 9 месяцев назад

    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.

    • @LaravelDaily
      @LaravelDaily  9 месяцев назад

      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

    • @sabinmagar4152
      @sabinmagar4152 9 месяцев назад

      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

    • @LaravelDaily
      @LaravelDaily  9 месяцев назад

      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.

    • @TimSpharaoh
      @TimSpharaoh 20 дней назад

      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

  • @ArislanHaikal
    @ArislanHaikal 11 месяцев назад +3

    Why people love filament? I don't like filament, because it's too slow. Any suggestion to speed up this? 😢

    • @flutterquickdemo2468
      @flutterquickdemo2468 11 месяцев назад

      disable debugbar views if added. Not sure why it is slow.

    • @LaravelDaily
      @LaravelDaily  11 месяцев назад +1

      What exactly is slow? Which functions? How do you measure slow? And yes, are you using debugbar, as the other comment says?

    • @ArislanHaikal
      @ArislanHaikal 11 месяцев назад +1

      @@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 🫣

    •  10 месяцев назад

      @@ArislanHaikal I use fresh installation on mac m1 pro... with database in docker. Everything is good.