I can`t catch Bican\Roles\Exceptions\AccessDeniedException in Handler.php
use Bican\Roles\Exceptions\AccessDeniedException as AccessDeniedException;
public function render($request, Exception $e)
{
die('sww');
if ($e instanceof AccessDeniedException) {
echo 'ss';die();
}
die('a');
return parent::render($request, 'ss');
}
but postman shows:
{
"message": "You don't have a required ['admin'] role.",
"status_code": 500,
}
I have registered middeleware in router, How to catch Bican\Roles\Exceptions\AccessDeniedException in Handler.php
I can`t catch Bican\Roles\Exceptions\AccessDeniedException in Handler.php
but postman shows:
I have registered middeleware in router, How to catch Bican\Roles\Exceptions\AccessDeniedException in Handler.php