In this course, we have covered all the basic features and all the primary use cases for packages for multi-tenancy. Let's spend some time on advanced features or what else we can do after installing the stancl/tenancy package.
Based on the demo project, I will continue working on that for upcoming lessons and will introduce a few more features and show how it works in a bit advanced way.
In this lesson, what do you do if you want to add something to the database structure of tenants?
For example, you have a task CRUD, and every tenant has its own database, and you want to add a field there. Let's add a description
column to the tasks.
The package adds tenant migrations into the database/migrations/tenant
folder. Then, instead of running the Artisan command migrate
, we must run the tenants:migrate
command.
So, first...