Skip to content

Custom Exception Responses in laravel #1020

@steve-mt

Description

@steve-mt

In the wiki you see the following to register exception responses, this seems to be specific for lumen. Where and how to I do this in a laravel 5.2 installation.

app('Dingo\Api\Exception\Handler')->register(function (Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException $exception) {
    return Response::make(['error' => 'Hey, what do you think you are doing!?'], 401);
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions