samedi 27 avril 2019

Laravel Custom Error Pages & Error Handling

I need to show suggestions related to its model if the model is not found. Let say User is accessing Job ABC21, but this job is no longer exist, and therefore Laravel displays an 404 Error page. Laravel by default only shows 404 Error Title and Message, however I want to change them by displaying list of Jobs suggestions.

Same scenario goes to other models.

I know that we can modify the view of 404 Error page by creating 404.blade.php inside resources/views/errors. But it only change the view.

How can I work around on this?

Thank You



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire