新增域名路由
This commit is contained in:
parent
aea9eb6a17
commit
27b30a8704
@ -18,12 +18,21 @@ class LoadModuleRoutes
|
|||||||
{
|
{
|
||||||
$router = app(Route::class);
|
$router = app(Route::class);
|
||||||
|
|
||||||
|
$domain = config('catch.domain');
|
||||||
|
if ($domain) {
|
||||||
|
$router->domain($domain, function () use ($router) {
|
||||||
|
foreach ($this->getRoutes() as $route) {
|
||||||
|
include $route;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
$router->group(function () use ($router) {
|
$router->group(function () use ($router) {
|
||||||
foreach ($this->getRoutes() as $route) {
|
foreach ($this->getRoutes() as $route) {
|
||||||
include $route;
|
include $route;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user