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

  • @khairahmanplus
    @khairahmanplus 4 года назад +4

    Thanks a lot for this. It help me understand better about Laravel. Anyways, Salam Ramadhan Al-Mubarak.

  • @jondoe79
    @jondoe79 4 года назад

    Looking forward for more quality tips like these.

  • @QiroLab
    @QiroLab 4 года назад +1

    Amazing tutorial. Great job!

  • @Mrxr00t
    @Mrxr00t 4 года назад

    Thanks mohamed very useful content. Middleware approach is good, but for me I would implement both

  • @1420timmy
    @1420timmy 4 года назад

    I didn't know you had a YT channel. But I have been following your blogs

    • @themsaid
      @themsaid 4 года назад +1

      Happy to have you here as well :)

  • @MrAhmedUA
    @MrAhmedUA 4 года назад +1

    thanks this really helped a lot

    • @themsaid
      @themsaid 4 года назад

      Glad it helped :)

  • @salimbaraza904
    @salimbaraza904 4 года назад

    Amazing...

    • @themsaid
      @themsaid 4 года назад

      Thanks for watching :)

  • @searchbarwebs
    @searchbarwebs 4 года назад

    Really clear and concise video, thanks a lot. BTW what IDE do you use?

    • @themsaid
      @themsaid 4 года назад

      I'm using PHPStorm. The theme is called Night Owel.

  • @jaybachre6976
    @jaybachre6976 2 года назад

    Can we use laravel sanctum along with laravel-multitenancy?

  • @hadesinferno813
    @hadesinferno813 2 года назад +1

    i have a multitenancy app.the app has one function and many domains are connected to it, what if 1 domain needs some features that requires adding extra migration file, how do yo handle it to run just that migration file for that user?

  • @MuhammetMTuran
    @MuhammetMTuran 3 года назад

    this multi tenants is package which you used?

  • @jainsiddharth21
    @jainsiddharth21 Месяц назад

    Hi, Great tutorial. I've used Tenancy with Multi Tenant & single DB. I need a functionality to ghost login my admin as a tenant user. Could you help me out with that please, if possible.

  • @kingshark8848
    @kingshark8848 4 года назад +1

    Awesome. Hope there will be cache and queue part.

    • @themsaid
      @themsaid 4 года назад

      Cache is covered in my next video. What concerns do you have about queues?

    • @kingshark8848
      @kingshark8848 4 года назад +1

      @@themsaid for queue, I've trying to know: should queue jobs be put into the centralized connection or separated for each tenant (db driver)? for redis driver maybe prefix? how to let queue workers recognize the tenant and go to the right connection of queue (if separated) and then process using right connection?

    • @themsaid
      @themsaid 4 года назад +1

      @@kingshark8848 If you plan to run a separate worker for each tenant then you can push each tenant's jobs to a separate queue and start a worker that consumes jobs from that queue only. However, the more tenants you have the more workers you'll need to run on your server which is resource consuming.

  • @alexo2537
    @alexo2537 2 года назад

    What package did you use for the multi-tenant? And you don't have the source code for this example?

  • @hamidalaei
    @hamidalaei 4 года назад +1

    Both solutions work great. But I have some thoughts:
    1. Using first approach, I must be sure the config is changed before anyone touches the session, or changes won't be applied, because of the singleton pattern. I would prefer it if laravel let me have multiple file session "connections" with different configs.
    2. Using the second approach, it is better to put TannentMiddleware immediately after SessionMiddleware, to be sure session is not used in between.

    • @themsaid
      @themsaid 4 года назад

      Good thoughts. It's important to not touch the session between updating the configurations or running the middleware indeed.

    • @rodolfo-w3
      @rodolfo-w3 2 года назад

      Hello, can you tell me how can I do the second option confirm you suggested.
      I don't find the SessionMiddleware to put TannentMiddleware then
      thanks

  • @amineadj6680
    @amineadj6680 2 года назад

    Hello Mohammed thank you for your videos, can you please help me to put project laravel Multi-tenant with Multi-database :
    I want to create user database, for example in my system there are two user A and B. I have a master Database and two database user_a (for user A) and user_b (for user B). In master Database i have the all users information. Now what i want, when user A logged in system it access user_a database, and when user B logged in database connection should be user_b database.
    I will be so thankful for your help.

  • @SEOng-gs7lj
    @SEOng-gs7lj Год назад

    this doesn't seem to work in Laravel 8.83.22, my session doesn't get saved into the tenant's ID subfolder, SessionManager seems to always use the original folder

  • @ajayinurudeen2269
    @ajayinurudeen2269 4 года назад

    Ah! one have to manually create session directory for every tenant?
    @Mohamed, what about in cases where every tenant sign up/register an account themselves which means the developer doesn't know the number of tenant they have at the moment.
    To state clearly, what if the number of tenant is like 500 or more? Does this means the developer would have to manually create session file directory for every tenant one by one.
    I feel the tenant middleware approach is better though..

    • @JacobChenn
      @JacobChenn 3 года назад

      I suppose on user sign-up or $tenant->configure() you can make sure that the session directory exists. Maybe Laravel will create it if it does not exist also

  • @kevinbatdorf
    @kevinbatdorf 4 года назад

    Did you have to manually create the directories or would they have been created automatically? 2:56

    • @themsaid
      @themsaid 4 года назад

      You have to manually create these.

    • @kevinbatdorf
      @kevinbatdorf 4 года назад

      @@themsaid or I guess with the custom console command from the previous lesson? Thanks

  • @MarkSnape
    @MarkSnape 4 года назад

    Should the app key be different between tenants. Would this be another approach?

    • @themsaid
      @themsaid 4 года назад

      I wouldn't recommend changing the APP_KEY as it's used internally by the framework to encrypt things.

    • @MarkSnape
      @MarkSnape 4 года назад

      such as cookies?

    • @themsaid
      @themsaid 4 года назад

      @@MarkSnape Cookies, serialized closures, and signed URLs.

    • @MarkSnape
      @MarkSnape 4 года назад

      @@themsaid yes, so I was wondering if there was a cross-domain weakness in tenants sharing the same secret app key for things like cookie and signed url encryption.

    • @themsaid
      @themsaid 4 года назад

      @@MarkSnape I don't think so. No tenant is supposed to know the key, same as the fact that no user is supposed to know the key in a non multitenant application.

  • @AmitMerchant
    @AmitMerchant 4 года назад

    Mono audio?

  • @TranceRVictriX
    @TranceRVictriX 3 года назад

    Great tutorial and explanation!