Laravel - Add trailing slash with Redirect::route()
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to add a slash to the end of the URL after I use Redirect::route() with Laravel. I've tried numerous examples but couldnt find an answer. This is what I have so far: routes.php : Route::get('/', function() { return Redirect::route('login'); }); Route::get('/login/', array( 'as' => 'login', 'uses' => 'Controller@login' )); Controller.php : public function login() { return 'Login page'; } When I go to htdocs/laravel_project/ , I get redirected to htdocs/laravel_project/login but I want it to be htdocs/laravel_project/login/ I want