Tenant Schema Resetting Too Early: A Laravel Livewire Gotcha
The Reimpact/platform project focuses on providing a multi-tenant application structure. Recently, we encountered an issue with tenant database schemas being reset prematurely during Livewire updates. This post dives into the problem and the solution implemented.
The Problem
In a multi-tenant application, each tenant typically has its own database schema. We use middleware to set the correct