Route::get('articles/create', 'ArticlesController@create');
Route::get('articles/{id}/show', 'ArticlesController@show');
Ye the solution above works!
So it is updated in 5.4? I mean, need something after "{id}"?
No, it isn't updated in 5.4. Route 'aticles/create' is synonymous with route 'articles/{id}'. Imagine that id === 'create'... Routes must are uniques. Another variant is:
Route::get('articles/create', 'ArticlesController@create');
Route::get('articles/show/{id}', 'ArticlesController@show');
GarlicBread: Your problem is not in the route of web.php, problem is in your ArticlesController, check the data that you assign in your ArticlesController to view in your single.blade.php, it will work for sure.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community