I am new to Laravel framework. I need to add a custom exception error handler. I tried to add below code to my global.php file:
App::error(function(CustomException $exception, $code)
{
echo 'Debug: CustomException<br/>';
});
To throw this error I used below code in one of my controllers:
throw new CustomException();
But I am getting error as CustomException not found.
I googled it for solution, but everywhere I find the same solution.
Please help me to get this fixed.