Joshuyo
1 year ago

laravel route conflict

Posted 1 year ago by Joshuyo

Here are my routes in web.php file:

Route::get('/articles', '[email protected]')->name('articles.index');
Route::get('/articles/{article}', '[email protected]')->name('articles.show');
Route::get('/articles/search', '[email protected]')->name('articles.search');

"http://localhost:8000/articles/search?key=google" triggers show method instead of intended search method.

Any suggestions?

Please sign in or create an account to participate in this conversation.