Building a Multi-Tenant (Multi-DB) Project in Laravel with Turso

Поделиться
HTML-код
  • Опубликовано: 24 ноя 2024

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

  • @notanactualuser
    @notanactualuser 3 месяца назад +2

    Cool to see more on Turso and Laravel

  • @FernandoMartinsdk
    @FernandoMartinsdk 2 месяца назад

    Interesting, by far this was the most unusual way to use "Tenancy for Laravel". Good video!

  • @vinsmokesanji9485
    @vinsmokesanji9485 Месяц назад +1

    Thank u for tutorial
    I want to use multi tenancy but instead of subdomain i want it to be passed through property code (tenant code)
    And when user want to logged in he should beside login and password add property code as well

  • @christostsangaris4785
    @christostsangaris4785 3 месяца назад +1

    High quality content as always!!! Thanks for sharing your knowledge !!

  • @mdsafikulislam9113
    @mdsafikulislam9113 3 месяца назад +4

    Please bring A Complete series of SaaS Application.

  • @bobbyiliev_
    @bobbyiliev_ 3 месяца назад

    Great video as always Josh! 👏
    I recently wrote a guide on the same topic but used the Neon Serverless Postgres product for the database side of things!

  • @minhajul007
    @minhajul007 3 месяца назад +2

    Great content. Thanks Josh.
    BTW how to get all the users from all the db of a multi tenant app?

    • @kikakhaled
      @kikakhaled 3 месяца назад

      the best way, to use synced resources in tenancy for laravel. and sync all users to your central db

  • @panggilmeiam
    @panggilmeiam 3 месяца назад

    What a perfect Video Josh!!! Damn it...

    • @joshcirre
      @joshcirre  3 месяца назад

      Thank YOU for all you do! ☺️

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

    Respect from Pakistan 🇵🇰 ❤

  • @CodeWithCrescent
    @CodeWithCrescent 15 дней назад

    Hi! I'm working on a multi-tenant Laravel 10 app with a database-per-tenant setup and a central database for admins and tenant management. I can add tenants and link their domains successfully, and user registrations work by storing data in the correct tenant databases. However, when I log in with tenant user credentials, the app logs me in as the central admin instead of as a tenant user. I'm using separate models and guards for Admin and User. Any ideas on how to resolve this issue?

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

    the developer mode is it a plugin on browser that show you current root or what are u using ?

  • @ricko13
    @ricko13 3 месяца назад

    the idea of multi db's sounds good on paper, but all I can think about is the hassle it would be to maintain/migrate/sync each individual database when you end up with millions 😅
    *same considerations applies to NoSQL databases when you interact with single documents rather than tables.

    • @joshcirre
      @joshcirre  3 месяца назад +3

      True. Maybe not great in every application.
      1. I think that’s where Turso shines to help out with that with the parent child schema. The Tenancy package also has some great tenant migration features.
      2. I think multi DB is great for sell-once software that you can kind of sell and then no longer have to manage.
      But agreed that it has advantages and disadvantages. And multitenancy in a single database works for most usecases. ☺️

    • @esdegan7176
      @esdegan7176 2 дня назад

      @@joshcirre "sell-once software", so its not good for SaaS?

  • @pedroluzio
    @pedroluzio 2 дня назад

    If you had to pick another services similar to turso but for mysql or postgres? do you have any opinion on that? Most of the stuff that I found for both of those databases are extremely expensive to have has a multi-database setup.
    One of the things I thought about doing is to find a way to have it split. Any customer that would be in lower plan would be on a single mysql database multi-tenant (or sqlite with turso) and any other client that would be on a high plan would be on a independent db. but not sure how to do that. and that would have to handle migrations between plans.

    • @pedroluzio
      @pedroluzio 2 дня назад

      I was using PlanetScale a while back in another project... and the prices for a single mysql instance... that was standing there without doing anything... were absurd. Doing the same... for a multi-database...

  • @hassamulhaq7762
    @hassamulhaq7762 2 месяца назад

    thanks, its helpful.

  • @StevenOrtiz-g5r
    @StevenOrtiz-g5r 2 месяца назад

    Where is the complete course? please.

  • @abujessica
    @abujessica 3 месяца назад

    lmao I've been building a chat app in which users can buy sites and launch it with their own themes and default settings
    I NEVER KNEW it was called so
    and I'm following a similar approach of multiple databases and multiple domains and multiple projects on vercel to manage environment variables for my users
    Although I had many take aways from this project, most importantly: starting with mult-tenancy architecture in mind makes building much easier and refactoring much less often
    I fukin hate my life tryna maintain this project I think I might to make a big refactor to fix it all!

    • @joshcirre
      @joshcirre  3 месяца назад

      Thanks for watching. That’s a good takeaway, it is incredibly easier if you know that’s how you’ll build it from the start!

  • @patiurco
    @patiurco 15 дней назад

    Great video, but what if I don't use livewire and I'm looking to identify tenants by path in single somain, can't find anything related... Single domain, múltiple db, tenants divided by path:
    MyDomain/tenant1/login
    MyDomain/tenant2/login

  • @elrincondeisma
    @elrincondeisma 3 месяца назад

    need video obs configuration!!!!!!
    is so pretty config!

    • @joshcirre
      @joshcirre  3 месяца назад

      Thank you! I’m planning on doing a video about that soon. ☺️

  • @squarkyt
    @squarkyt 2 месяца назад

    What plugin are you using to hide the tailwind class names by default?

    • @joshcirre
      @joshcirre  2 месяца назад

      This is the Tailwind Fold plugin. :)

  • @ryanp56
    @ryanp56 3 месяца назад +1

    Bro sent too much traffic to Turso 😁

  • @wtfdoiputhere
    @wtfdoiputhere 3 месяца назад

    i am tinkering around with policies in laravel today and i wanted to know how would i implement a "regular" and admin user accounts ? my current approach is just a "role" field in my model and a selection in my sign up form then i created a policy for my tickets to check if the user role is admin and that works as expected
    my question is : is this the proper way ? could my approach be improved ?

    • @piotrwielki5433
      @piotrwielki5433 3 месяца назад

      Roles (and simpler form of them ex. Boolean Field isAdmin) is the best choice.

  • @HomeOfWorld.
    @HomeOfWorld. 3 месяца назад +1

    but how to add role to the users and what they can do

    • @joshcirre
      @joshcirre  3 месяца назад +1

      I made this video on the official Laravel Channel for a quick primer on how you would implement that. That would be a good follow-up.
      Basically with having separate databases, you have the ability to have "roles" where then each role would have their own gate.
      Of course, adding a package to help with this is a good way to make it happen too. :)
      ruclips.net/video/NXt5XqyaaNE/видео.html

  • @fawad0301
    @fawad0301 3 месяца назад

    Very interseting topic for me...😅

  • @DougLopes
    @DougLopes 2 месяца назад

    Too bade libsql is not supported for windows.

    • @zuma206
      @zuma206 14 дней назад

      Use WSL, all web developers should be. You don't deploy the windows so you don't develop on windows.