How do I make Laravel 5.3 create route URLs with trailing slashes?
The route is defined as
Route::get('/home/', ['as' => 'home', 'uses' => 'HomeController@index']);
I then create the url with the route helper function in a view:
{{ route('home') }}
This creates http://localhost:8000/home
instead of http://localhost:8000/home/
.
This question is very similar to Laravel - append a trailing slash in routes, but that question doesn't have an answer either and it seems to me that my description is a tat shorter.
Edit: The two possible naming methods from the docs don't make a difference:
Route::get('/home/', ['as' => 'home', 'uses' => 'HomeController@index']);
Route::get('/home/', 'HomeController@index')->name('home');