mostbyte / multidomain
Mostbyte domain manager
5.0.0
2024-05-27 07:52 UTC
Requires
- php: ^8.2
- illuminate/database: ^11.0
- illuminate/http: ^11.0
- illuminate/support: ^11.0
Requires (Dev)
- orchestra/testbench: ^9.0
- phpunit/phpunit: ^11.0
- dev-master
- 5.0.0
- 4.2.1
- 4.2
- 4.1.2
- 4.1.1
- 4.1
- 4.0.0
- 3.3.9
- 3.3.8
- 3.3.7
- 3.3.6
- 3.3.5
- 3.3.4
- 3.3.3
- 3.3.2
- 3.3.1
- 3.3
- 3.2
- 3.1.5
- 3.1.4
- 3.1.3
- 3.1.2
- 3.1.1
- 3.1
- 3.0.2
- 3.0.1
- 3.0.0
- 2.3.4
- 2.3.3
- 2.3.2
- 2.3.1
- 2.3.0
- 2.2.1
- 2.2.0
- 2.1.5
- 2.1.4
- 2.1.3
- 2.1.2
- 2.1.1
- 2.1.0
- 2.0.2
- 2.0.1
- 1.3.1
- 1.2.2
- 1.2.1
- 1.2
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1
- 1.0.0
- 0.2.2
- 0.2.1
- 0.2
- 0.1
This package is auto-updated.
Last update: 2024-05-27 07:59:24 UTC
README
Multi Domain for Laravel
An extension for using Laravel in a multi subdomains setting
Documentation
Version Compatibility
Laravel | Package |
---|---|
9.x | 1.x-2.x (deprecated) |
10.x | 3.x-4.x |
11.x | 5.x |
Installation
To get the latest version of Mostbyte Multidomain
, simply require the project using Composer
composer require mostbyte/multidomain
Instead, you may of course manually update your requirement block and run composer update
if you so choose:
{ "require": { "mostbyte/multidomain": "^5.0" } }
Publishing config files
php artisan vendor:publish --provider="Mostbyte\Multidomain\MultidomainServiceProvider"
Usage
There is a helper mostbyteDomainManager
, that returns DomainManager
and you can use all methods which created in it, for example:
$subDomain = mostbyteDomainManager()->getSubDomain();
Console Commands Documentation
- First of all you need to create new schema with command below
php artisan mostbyte:schema {schema}
- Then you can run migration with following command and with all flags which exists in default Laravel
migrate
command
php mostbyte:migrate {schema} {--force : Force the operation to run when in production} {--realpath : Indicate any provided migration file paths are pre-resolved absolute paths} {--pretend : Dump the SQL queries that would be run} {--seed : Indicates if the seed task should be re-run} {--step : Force the migrations to be run so they can be rolled back individually} {--all : Run migrations for all schemas}
- Or there is the command for refreshing database
php mostbyte:fresh {schema} {--realpath : Indicate any provided migration file paths are pre-resolved absolute paths} {--seed : Indicates if the seed task should be re-run} {--step : Force the migrations to be run so they can be rolled back individually}
- If you want to DELETE the schema with all data in, run this command
php artisan mostbyte:rollback {schema}