Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

how to use model not found exception handler laravel

App::error(function(IlluminateDatabaseEloquentModelNotFoundException $exception) {

    // Log the error
    Log::error($exception);

    // Redirect to error route with any message
    return Redirect::to('error')->with('message', $exception->getMessage());
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #model #exception #handler #laravel
ADD COMMENT
Topic
Name
4+5 =