我看到 Laravel 5.2 改变了routes.php
使用。
事实上,旧的:
Route::controllers([
'auth' => 'Auth\AuthController',
'password' => 'Auth\PasswordController',
]);
现在不工作。
相反,我发现最好使用:
Route::Auth();
但是这种方法不提供密码和注册路由,就像它用来...
实际上,我使用了我在 Stack Overflow 上看到的解决方案,使用 get 和 post 方法:
// Authentication Routes...
Route::get('login', 'Auth\AuthController@showLoginForm');
[...]
// Registration Routes...
Route::get('register', 'Auth\AuthController@showRegistrationForm');
[...]
// Password Reset Routes...
Route::get('password/reset/{token?}','Auth\PasswordController@showResetForm');
[...]
这很糟糕,那么对于这个新的 Laravel 版本,5.2 route.php 文件有更好的用法吗?
谢谢你的帮助 !