PHP code example of mamdouhkhaled / tenancy-modules

1. Go to this page and download the library: Download mamdouhkhaled/tenancy-modules library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

mamdouhkhaled / tenancy-modules example snippets


php artisan tenancy:install // fresh install only
php artisan migrate

php artisan vendor:publish --tag=tenancymodules

php artisan module:tenant-enable --tenant={{tenant-id}} // enable all modules for this tenant
php artisan module:tenant-enable --tenant={{tenant-id}} --module={{module_name}} // enable `module_name` modules for this tenant

php artisan module:tenant-disable --tenant={{tenant-id}} // enable all modules for this tenant
php artisan module:tenant-disable --tenant={{tenant-id}} --module={{module_name}} // enable `module_name` modules for this tenant

php artisan module:tenant-migrate --tenants={{tenant-id}}// tenant is comma separated
php artisan module:tenant-migrate --tenants={{tenant-id}} {{module}}

php artisan module:tenant-migrate-rollback --tenants={{tenant-id}}
php artisan module:tenant-migrate-rollback --tenants={{tenant-id}} {{module}}

php artisan module:tenant-seed --tenants={{tenant-id}}// tenant is comma separated
php artisan module:tenant-seed --tenants={{tenant-id}} {{module}}