小编Jie*_*ara的帖子

Laravel 5.2 Auth和密码路由

我看到Laravel 5.2改变了routes.php用途.

事实上,旧的:

Route::controllers([
'auth' => 'Auth\AuthController',
'password' => 'Auth\PasswordController',
]);
Run Code Online (Sandbox Code Playgroud)

现在不行.

相反,我看到它更好用:

Route::Auth();
Run Code Online (Sandbox Code Playgroud)

但是这种方法不提供密码和注册路由,就像它用来......

实际上,我使用我在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');
[...]
Run Code Online (Sandbox Code Playgroud)

这是非常糟糕的,所以这个新的Laravel版本有更好的5.2 route.php文件的使用吗?

谢谢你的帮助 !

php laravel laravel-5.2

4
推荐指数
1
解决办法
1万
查看次数

标签 统计

laravel ×1

laravel-5.2 ×1

php ×1