Save 37% off PRO during our Black Friday Sale! »

A practical look at multitenancy in Laravel (Laracon US)

A practical look at multitenancy in Laravel (Laracon US)


Freek Van der Herten

August 26, 2020


  1. A practical look at multitenancy in Laravel

  2. About me Freek Van der Herten @freekmurze



  6. Multitenancy in Laravel

  7. What is multitenancy? A single application that serves several (groups

    of) users Users/teams cannot see data of other users/teams Multiple approaches: single database, multiple databases Tom Schlick at Laracon US:

  9. spatie/laravel-multitenancy 1. Determine which tenant should be made current 2.

    Dynamically change configuration when switching tenant 3. Light tooling for migrations and running artisan commands
  10. Multi DB Demo & Source Dive

  11. Laravel Multitenancy A lightweight package Adapt to your own needs

    Single and multiple databases strategies
  12. Do you really need a package for multitenancy? Multitenancy seems

    daunting, but can be simple Take care of it yourself Steal the implementation of the package One less dependency to worry about
  13. One more thing…

  14. Do you ever work on client projects?

  15. Mostly very large ones that take months or years to

    complete laravel-multitenancy, laravel-event-sourcing, laravel-view-models, … Good way of building larger than average apps

  17. Book + premium video course A way of building

    large maintainable Laravel apps Many principles applicable to smaller projects as well 15% discount: LARACON-BEYOND-CRUD-LAUNCH
  18. Thank you! Mohamed on multitenancy: