HttpRoutes目录下的所有.php文件叫什么名字?
- 内容介绍
- 文章标签
- 相关推荐
本文共计128个文字,预计阅读时间需要1分钟。
plaintext修改伪原创以下代码头部和内容,不超过100字:
plaintextpublic function map($router){ // 使用当前命名空间 $this->routerGroup(['namespace'=> $this->namespace], function ($router) { // 引入路由配置文件 require app_path('Http/routes.php'); });
$this->routerGroup(['namespace'=> $this->namespace], function ($router) { // 定义路由 // ... });}
public function map(Router $router) { // $router->group(['namespace' => $this->namespace], function ($router) { // require app_path('Http/routes.php'); // }); $router->group(['namespace' => $this->namespace], function ($router) { // require app_path('Http/routes.php'); foreach (glob(app_path('Http//Routes') . '/*.php') as $file) { // $this->app->make('App\\Http\\Routes\\' . basename($file, '.php'))->map($router); $list = explode('/',$file); require app_path('Http//Routes//') . $list[count($list)-1]; } }); }
本文共计128个文字,预计阅读时间需要1分钟。
plaintext修改伪原创以下代码头部和内容,不超过100字:
plaintextpublic function map($router){ // 使用当前命名空间 $this->routerGroup(['namespace'=> $this->namespace], function ($router) { // 引入路由配置文件 require app_path('Http/routes.php'); });
$this->routerGroup(['namespace'=> $this->namespace], function ($router) { // 定义路由 // ... });}
public function map(Router $router) { // $router->group(['namespace' => $this->namespace], function ($router) { // require app_path('Http/routes.php'); // }); $router->group(['namespace' => $this->namespace], function ($router) { // require app_path('Http/routes.php'); foreach (glob(app_path('Http//Routes') . '/*.php') as $file) { // $this->app->make('App\\Http\\Routes\\' . basename($file, '.php'))->map($router); $list = explode('/',$file); require app_path('Http//Routes//') . $list[count($list)-1]; } }); }

