Newly installed Laravel 5.5 showing Sorry, the page you are looking for could not be found. without any error . Please see the screenshot :
I think its not even looks into routes file, this is my routes.php and htaccess
What will be the reason for this ?
All your WEB routes will be located in the file:
routes\web.php
Register your routes there.
Pay attention to routes order, it's really important (fooled me so many times to be honest).
Because Laravel goes through list of routes top to bottom until it finds the first match, as a rule of thumb, try to define routes with no parametres first then routes with parameters in your route file (web/api).
Example: (based on Radical's answer)
Route::get('/blog/{id}', 'BlogController@show');
Route::get('/blog/comments', 'BlogController@comments');
In this case, Route::get('/blog/{id}', 'BlogController@show');
comes first so it would be selected. Even when what you really want is Route::get('/blog/comments', 'BlogController@comments');
My two cents :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With