Created
February 6, 2019 07:13
-
-
Save AhmedHelalAhmed/31d5bc0efd42f5afe3766c90785c4ee8 to your computer and use it in GitHub Desktop.
multi-tenant commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
composer require hyn/multi-tenant ~5.1 |
Because we are using MySQL, we need to limit UUID length generated by the multi-tenant package to under 32 characters and this can be set by using an environment variable LIMIT_UUID_LENGTH_32. Set it to true in your .env file:
LIMIT_UUID_LENGTH_32=true
move your migrations into
database/migrations/tenant
if you want to make it for each tenant
php artisan tenancy:install
https://laravel-tenancy.com/docs/hyn/5.1/installation
php artisan vendor:publish --tag=tenancy
https://laravel-news.com/laravel-5-4-key-too-long-error
php artisan migrate --database=system
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
in config/database.php change mysql to system
Now open your .env