Support the ongoing development of Laravel.io →
Views Forms Laravel
Last updated 2 weeks ago.
0
Route::get('articles/create', '[email protected]');
Route::get('articles/{id}/show', '[email protected]');
0

Ye the solution above works!

So it is updated in 5.4? I mean, need something after "{id}"?

0

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', '[email protected]');
Route::get('articles/show/{id}', '[email protected]');
0

OH! I see! That makes sense.

Thank you!

0

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.

0

Sign in to participate in this thread!

LaraJobs

Your banner here too?

GarlicBread GarlicBread qrcoode Joined 17 Jul 2017

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2022 Laravel.io - All rights reserved.