php – laravel 5 / auth / login not found

前端之家收集整理的这篇文章主要介绍了php – laravel 5 / auth / login not found前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
@H_502_0@ 我在routes.PHP上做了一些更改,其余配置是默认的. routes.PHP如下:
//Route::get('/','WelcomeController@index');

Route::get('/','HomeController@index');

Route::controllers([
    'auth' => 'Auth\AuthController','password' => 'Auth\PasswordController',]);

PHP artisan route的输出:list is

+--------+--------------------------------+-------------------------------------------------------+------+------------------------------------------------------------+------------+
| Domain | Method                         | URI                                                   | Name | Action                                                     | Middleware |
+--------+--------------------------------+-------------------------------------------------------+------+------------------------------------------------------------+------------+
|        | GET|HEAD                       | /                                                     |      | App\Http\Controllers\HomeController@index                  | auth       |
|        | GET|HEAD                       | auth/register/{one?}/{two?}/{three?}/{four?}/{five?}  |      | App\Http\Controllers\Auth\AuthController@getRegister       | guest      |
|        | POST                           | auth/register/{one?}/{two?}/{three?}/{four?}/{five?}  |      | App\Http\Controllers\Auth\AuthController@postRegister      | guest      |
|        | GET|HEAD                       | auth/login/{one?}/{two?}/{three?}/{four?}/{five?}     |      | App\Http\Controllers\Auth\AuthController@getLogin          | guest      |
|        | POST                           | auth/login/{one?}/{two?}/{three?}/{four?}/{five?}     |      | App\Http\Controllers\Auth\AuthController@postLogin         | guest      |
|        | GET|HEAD                       | auth/logout/{one?}/{two?}/{three?}/{four?}/{five?}    |      | App\Http\Controllers\Auth\AuthController@getlogout         |            |
|        | GET|HEAD|POST|PUT|PATCH|DELETE | auth/{_missing}                                       |      | App\Http\Controllers\Auth\AuthController@missingMethod     | guest      |
|        | GET|HEAD                       | password/email/{one?}/{two?}/{three?}/{four?}/{five?} |      | App\Http\Controllers\Auth\PasswordController@getEmail      | guest      |
|        | POST                           | password/email/{one?}/{two?}/{three?}/{four?}/{five?} |      | App\Http\Controllers\Auth\PasswordController@postEmail     | guest      |
|        | GET|HEAD                       | password/reset/{one?}/{two?}/{three?}/{four?}/{five?} |      | App\Http\Controllers\Auth\PasswordController@getReset      | guest      |
|        | POST                           | password/reset/{one?}/{two?}/{three?}/{four?}/{five?} |      | App\Http\Controllers\Auth\PasswordController@postReset     | guest      |
|        | GET|HEAD|POST|PUT|PATCH|DELETE | password/{_missing}                                   |      | App\Http\Controllers\Auth\PasswordController@missingMethod | guest      |
+--------+--------------------------------+-------------------------------------------------------+------+------------------------------------------------------------+------------+

当我通过http:// laravel /我访问该网站时

The requested URL /auth/login was not found on this server.

但如果我使用http://laravel/index.PHP/auth/login,它可以正常工作.我的路由有什么问题?

我在Windows 7 64位上使用WAMP.

您需要为apache启用mode_rewrite.我在此博客解决了这个问题
http://www.kingpabel.com/apache-mod_rewrite/
原文链接:https://www.f2er.com/laravel/135642.html

猜你在找的Laravel相关文章