Skip to content
Advertisement

Error 404 on a view that exists on routes. The URL exists as well as the view but it keeps returning error 404

I am getting an error 404 from a view that actually exists in my routes. This is the view where I select the data from (sidebar.blade.php)

JavaScript

This my routes file i.e (web.php).

JavaScript

This is the controller of the view file frontController.blade.php (browse_categories.blade.php). The function is browse()

JavaScript

This is the view file I get the error 404 (detail.blade.php)

JavaScript

This is the controller of the view file where I get the error 404 i.e detail.blade.php (Resume Controller) The function is resume

JavaScript

Advertisement

Answer

Overall Solution: Replace url('/resume/'.$res->id) with action('ResumeController@resume', $resume). You may have to rearrange the order of your two url same routes. I highly recommend that you make them separate urls or remove the parameter from the one.

Solution to Current Problem: You can run php artisan route:list and it’ll give you an output of every single valid route. From there, you’ll be able to see the issue.

Side note: You can use any instead of match.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement