mostbyte / multidomain
Mostbyte 域管理器
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-09-27 08:40:48 UTC
README
多域名用于Laravel
用于在多子域名环境下使用Laravel的扩展
文档
版本兼容性
安装
要获取 Mostbyte Multidomain 的最新版本,只需使用 Composer 需求项目
composer require mostbyte/multidomain
当然,您也可以手动更新需求块并运行 composer update,如果这样选择的话
{
"require": {
"mostbyte/multidomain": "^5.0"
}
}
发布配置文件
php artisan vendor:publish --provider="Mostbyte\Multidomain\MultidomainServiceProvider"
使用方法
有一个助手 mostbyteDomainManager,它返回 DomainManager,您可以使用其中创建的所有方法,例如
$subDomain = mostbyteDomainManager()->getSubDomain();
控制台命令文档
- 首先,您需要使用以下命令创建新模式
php artisan mostbyte:schema {schema}
- 然后,您可以使用以下命令运行迁移,并使用默认Laravel
migrate命令中的所有标志
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}
- 或者还有刷新数据库的命令
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}
- 如果您想 删除 模式 以及其中所有数据,运行此命令
php artisan mostbyte:rollback {schema}