In this video we'll be taking an in-depth look at our multi-tenant food ordering app, that's built in Laravel. We'll talk about our single, shared database approach, and the issues that come with it. And finally we take a look at how tenant resolving works in our application. How a flash sale took down our entire system: This project started in 2014 and is still going strong. 00:00 - Introduction 00:18 - Laravel Multitenancy 01:03 - Our database setup 01:48 - Lessons learned 01:55 - 1) Don't use distant relationships 03:59 - 2) Use orWhere with caution 05:31 - 3) Pay extra attention to indices 06:37 - 4) Don't use global scopes 07:29 - Tenant resolving 09:25 - Outro
Hide player controls
Hide resume playing