Flugg\Responder\Traits\HandlesApiErrors::transformEloquentException PHP Метод

transformEloquentException() защищенный Метод

Transform an Eloquent exception into an API exception.
protected transformEloquentException ( Exception $exception ) : void
$exception Exception
Результат void
    protected function transformEloquentException(Exception $exception)
    {
        if ($exception instanceof ModelNotFoundException) {
            throw new ResourceNotFoundException();
        }
        if ($exception instanceof RelationNotFoundException) {
            throw new RelationNotFoundException();
        }
    }