页面未找到加载更深层的Laravel路由

时间:2015-08-16 10:39:23

标签: php laravel routing

尽管可以加载/articles/create/article,但似乎无法在Laravel中加载类似/article/{id}的路线。我仍然得到错误:

Sorry, the page you are looking for could not be found.

当它显然有一些简单的东西

Route::get('/articles/create', function() { 
        return "The Real Slim Shady";   
}); 

编辑:我的日志中也没有错误,只有[Sun Aug 16 04:39:49 2015] ::1:60349 [200]: /favicon.ico所以没有什么有趣的。

编辑:

MyComputer:laravel myname$ php artisan route:list
+--------+----------+-----------------+------+-----------------------------------------------+------------+
| Domain | Method   | URI             | Name | Action                                        | Middleware |
+--------+----------+-----------------+------+-----------------------------------------------+------------+
|        | GET|HEAD | /               |      | Closure                                       |            |
|        | GET|HEAD | articles        |      | App\Http\Controllers\ArticlesController@index |            |
|        | GET|HEAD | articles/create |      | Closure                                       |            |
|        | GET|HEAD | articles/{id}   |      | App\Http\Controllers\ArticlesController@show  |            |
|        | GET|HEAD | laravel         |      | Closure                                       |            |
+--------+----------+-----------------+------+-----------------------------------------------+------------+

路线确实存在。

编辑:

我还尝试更改每个Laravel关于.htaccess规则的mod_rewrite指令。我唯一可以改变的是将Options -MultiViews更改为Options +FollowSymLinks但不做任何更改。

0 个答案:

没有答案