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: youtube.com/watch?v=T-gHOXFpZvg
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
Laravel Multitenancy A lightweight package Adapt to your own needs Single and multiple databases strategies spatie.be/docs/laravel-multitenancy github.com/spatie/laravel-multitenancy#alternatives
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
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
laravel-beyond-crud.com Book + premium video course A way of building large maintainable Laravel apps Many principles applicable to smaller projects as well 25% discount: THANKS-FOR-WATCHING-PHP-LONDON