mostbyte / multidomain
Mostbyte domain manager
1.1.1
2025-06-09 17:55 UTC
Requires
- php: ^8.2
- illuminate/database: ^11.0
- illuminate/http: ^11.0
- illuminate/support: ^11.0
- mostbyte/auth: ^3.1.3
Requires (Dev)
- orchestra/testbench: ^9.0
- phpunit/phpunit: ^11.0
This package is auto-updated.
Last update: 2025-07-09 18:10:35 UTC
README
Multi Domain for Laravel
An extension for using Laravel in a multi subdomains setting
Documentation
Version Compatibility
Laravel | Package |
---|---|
11.x | 1.x (actual) |
11.x | 5.x (deprecated) |
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": "^1.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}