I would like to know how to handle personalized messages in errors. For now I have this in app / Exceptions / Handler.php
public function render($request, Exception $e)
{
return response()->view('errors.error', ['error_message' => $e->getMessage()], 500);
}
And in the error.blade.php file located in the errors folder, I simply have a custom view so that the message comes out of some color but I would like to know if it is possible that for each type of error you can send a different message to the user on the screen.