Flarum\Api\Handler\MethodNotAllowedExceptionHandler::handle PHP Method

handle() public method

public handle ( Exception $e )
$e Exception
    public function handle(Exception $e)
    {
        $status = 405;
        $error = ['status' => (string) $status, 'code' => 'method_not_allowed'];
        return new ResponseBag($status, [$error]);
    }
MethodNotAllowedExceptionHandler