mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-08 15:42:48 +08:00
改进
This commit is contained in:
@@ -13,7 +13,6 @@ namespace think\console\command\optimize;
|
|||||||
use think\console\command\Command;
|
use think\console\command\Command;
|
||||||
use think\console\Input;
|
use think\console\Input;
|
||||||
use think\console\Output;
|
use think\console\Output;
|
||||||
use think\Route;
|
|
||||||
|
|
||||||
class Route extends Command
|
class Route extends Command
|
||||||
{
|
{
|
||||||
@@ -37,8 +36,8 @@ class Route extends Command
|
|||||||
protected function buildRouteCache()
|
protected function buildRouteCache()
|
||||||
{
|
{
|
||||||
$config = include CONF_PATH . 'route' . CONF_EXT;
|
$config = include CONF_PATH . 'route' . CONF_EXT;
|
||||||
Route::import($config);
|
\think\Route::import($config);
|
||||||
$rules = Route::rules(true);
|
$rules = \think\Route::rules(true);
|
||||||
array_walk_recursive($rules, [$this, 'buildClosure']);
|
array_walk_recursive($rules, [$this, 'buildClosure']);
|
||||||
$content = '<?php ' . PHP_EOL . 'return ';
|
$content = '<?php ' . PHP_EOL . 'return ';
|
||||||
$content .= var_export($rules, true) . ';';
|
$content .= var_export($rules, true) . ';';
|
||||||
|
|||||||
Reference in New Issue
Block a user