json([ 'error' => 'Resource not found' ], 404); } if ($exception instanceof AuthorizationException) { return 'test'; } return parent::render($request, $exception); } }