Skip to content

Commit

Permalink
建议后台可以配置或者设置单独绑定域名,这样管理后台可以更安全 #10
Browse files Browse the repository at this point in the history
  • Loading branch information
SmallRuralDog committed May 7, 2020
1 parent 16364f2 commit 27b8b12
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions config/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
],
'bootstrap' => app_path('Admin/bootstrap.php'),
'route' => [
'domain'=>null,
'prefix' => env('ADMIN_ROUTE_PREFIX', 'admin'),
'api_prefix' => env('ADMIN_ROUTE_PREFIX', 'admin-api'),
'namespace' => 'App\\Admin\\Controllers',
Expand Down
2 changes: 2 additions & 0 deletions routes/route.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
use SmallRuralDog\Admin\Controllers\RootController;

Route::group([
'domain'=>config('admin.route.domain'),
'prefix' => config('admin.route.prefix'),
'middleware' => config('admin.route.middleware'),
], function (Router $router) {
Expand All @@ -18,6 +19,7 @@

});
Route::group([
'domain'=>config('admin.route.domain'),
'prefix' => config('admin.route.api_prefix'),
'namespace' => '\SmallRuralDog\Admin\Controllers'
], function (Router $router) {
Expand Down
1 change: 1 addition & 0 deletions src/Console/stubs/routes.stub
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use Illuminate\Routing\Router;

Route::group([
'domain'=>config('admin.route.domain'),
'prefix' => config('admin.route.api_prefix'),
'namespace'=>config('admin.route.namespace'),
'middleware' => config('admin.route.middleware'),
Expand Down

0 comments on commit 27b8b12

Please sign in to comment.