Sorry, the page you are looking for could not be found without showing any error : Laravel 5.5

60.5k views Asked by At

Newly installed Laravel 5.5 showing Sorry, the page you are looking for could not be found. without any error . Please see the screenshot : enter image description here

I think its not even looks into routes file, this is my routes.php and htaccess enter image description here

enter image description here

What will be the reason for this ?

6

There are 6 answers

1
Arthur Samarcos On BEST ANSWER

All your WEB routes will be located in the file:

routes\web.php

Register your routes there.

0
Keval Mangukiya On

I think you can use this commands:

  1. php artisan config:cache
  2. php artisan view:clear

these commands use and I hope your error solve

0
gaborkorodi On

Ensure that your register.blade.php is in the resources/views directory and remove the trailing slash from the URL you are assigning to this view.

Sometimes the error messages in the storage/logs/laravel.log log file (if you have the default configuration) can help as well.

0
Alexandra Axt On

I ran into this issue when findOrFail method failed in the Controller method.

0
chebaby On

Order

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 :)

0
Precious Nanle Luke On

There are a lot of reasons why this won't work

  1. Probably the route was written well eg: Route::get('/boost/{type}/{{type_id}}', ['uses' => 'RequestController@getBoosted', 'as'=>'boosts/{{type}}/{{type_id}}']); when it is meant to be like this: Route::get('/boost/{type}/{type_id}', ['uses' => 'RequestController@getBoosted', 'as'=>'boosts/{type}/{type_id}']); Looking at the two above code the second route is correct because of the curly brackets are one instead of two

  2. Probably you will be needing to clear your cache which happens at rare occasions

  3. Probably the developer in question did not put the links properly at there controllers Return view('site.block') you must make sure that the page that is referenced is at the correct location