mirror of
https://gitee.com/apiadmin/ApiAdmin.git
synced 2025-04-06 03:58:00 +08:00
modified 重新定义生成规则
This commit is contained in:
parent
89ff86b55e
commit
4a76ba708a
@ -20,7 +20,7 @@ class RouterTool {
|
|||||||
public static function buildAdminRouter() {
|
public static function buildAdminRouter() {
|
||||||
$methodArr = ['*', 'get', 'post', 'put', 'delete'];
|
$methodArr = ['*', 'get', 'post', 'put', 'delete'];
|
||||||
$routePath = Env::get('route_path') . 'route.php';
|
$routePath = Env::get('route_path') . 'route.php';
|
||||||
$bakPath = Env::get('route_path') . 'route.php.bak';
|
$bakPath = Env::get('route_path') . 'route.bak';
|
||||||
if (file_exists($bakPath)) {
|
if (file_exists($bakPath)) {
|
||||||
unlink($bakPath);
|
unlink($bakPath);
|
||||||
}
|
}
|
||||||
@ -42,6 +42,7 @@ class RouterTool {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$context .= "Route::group('admin', function() {Route::miss('admin/Miss/index');})->middleware('AdminResponse');" . PHP_EOL;
|
||||||
|
|
||||||
file_put_contents($routePath, $context);
|
file_put_contents($routePath, $context);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user