简体   繁体   English

Laravel 5.1 Application没有任何路线

[英]Laravel 5.1 Application don't have any route

I create few route but don't display any route. 我创建的路线很少,但不显示任何路线。 验证码

Firstly , make sure that routes.php file is loaded in your RouteServiceProvider . 首先 ,确保routes.php文件文件在您的RouteServiceProvider加载。 You should see the following in its map() method: 您应该在其map()方法中看到以下内容:

public function map(Router $router)
{
  $router->group(['namespace' => $this->namespace], function ($router) {
    require app_path('Http/routes.php');
  });
}

Secondly , it you have route caching enabled, it might happen that you've cached empty list of routes before any routes were added on routes.php and now are reusing the cached version. 其次 ,它启用了路由缓存,这可能是在将任何路由添加到route.php之前,您已经缓存了空的路由列表, 现在正在重用缓存的版本。 Run php artisan route:clear and then php artisan route:list - if that was the reason, you should see new all the routes. 运行php artisan route:clear ,然后运行php artisan route: list-如果是这个原因,您应该看到所有新的路由。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM