Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

dmitry3's avatar

php artisan route:list -> route is not listed (Laravel 5.5)

I have defined two routes in web.php:

Route::get('contact', 'ContactController@index')->name('contact.index');
Route::get('contact', 'ContactController@create')->name('contact.create');

When I do php artisan route:list, 'contact.index' is not listed:

 GET|HEAD  | contact  | contact.create   | App\Http\Controllers\ContactController@create    | web

Why 'contact.index' is not presented in the list? Many thanks!

0 likes
4 replies
MichalOravec's avatar
Level 75

Oh ok, you have same uri contact there in both routes. The second one replace the first one.

So change it

Route::get('contact', 'ContactController@index')->name('contact.index');
Route::get('contact'/create, 'ContactController@create')->name('contact.create');
1 like

Please or to participate in this conversation.