Download the PHP package rocketslab/laravel-multitenancy-extensions without Composer
On this page you can find all versions of the php package rocketslab/laravel-multitenancy-extensions. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download rocketslab/laravel-multitenancy-extensions
More information about rocketslab/laravel-multitenancy-extensions
Files in rocketslab/laravel-multitenancy-extensions
Package laravel-multitenancy-extensions
Short Description Spatie Laravel Multitenancy Extensions Package
License MIT
Informations about the package laravel-multitenancy-extensions
Multitenancy Extensions
Versão em português (Brasil)
This package are created for use with Spatie's Laravel Multitenancy.
Installation
Configuration
Publish default configuration.
Activating the default database to current Tenant
By default, the multitenancy package has a task to do
the database switching on each request. But by doing this in
background (when creating a new Tenant), the default
database
is not assigned. And so when trying to migrate the tables and populate the database
with initial data the new database is not found by Laravel.
To solve this add the ActiveDefaultDatabase
task to the
task array in multitenancy
config file as first from the list.
Creating Tenants Databases
After configuring the spatie/laravel-tenancy
Tenant model. You can
activate automatic database creation. To do this, include the ShoudCreateDatabase
trait
to Tenant model.
Landlord Database Migration Helper
This package comes with a command to help migrate to landlord database.
This command run all migrations in the database/migrations/landlord
folder by default.
If you can modify this, edit landlord
configuration section in multitenancy-extensions
configuration file.
Optionally you can use --fresh
flag to drop all tables and migrate.
Created by @jjsquady - Jorge Gonçalves
Thanks to Spatie team.
License MIT
All versions of laravel-multitenancy-extensions with dependencies
laravel/framework Version ^8.0
spatie/laravel-multitenancy Version ^2.1
stancl/jobpipeline Version ^1.5