src/Routing/Router.php
public function dispatch(Request $request)
    {
        $this->currentRoute = null;

        $this->container->instance(Request::class, $request);

        $this->routesDispatched++;

        try {
            $response = $this->adapter->dispatch($request, $request->version());
        } catch (Exception $exception) {
            if ($request instanceof InternalRequest) {
                throw $exception;
            }

            $this->exception->report($exception);

            $response = $this->exception->handle($exception);
        }

        return $this->prepareResponse($response, $request, $request->format());
    }
public function dispatch(Request $request)
    {
        $this->currentRoute = null;

        $this->container->instance(Request::class, $request);

        $this->routesDispatched++;

        try {
            $response = $this->adapter->dispatch($request, $request->version());
        } catch (Exception $exception) {
            if ($request instanceof InternalRequest) {
                throw $exception;
            }

            $this->exception->report($exception);

            $response = $this->exception->handle($exception);
        }

        return $this->prepareResponse($response, $request, $request->format());
    }
public function dispatch ( Request $ request ) { $ this -> currentRoute = null ; $ this -> container -> instance ( Request :: class , $ request ) ; $ this -> routesDispatched ++ ; try { $ response = $ this -> adapter -> dispatch ( $ request , $ request -> version ( ) ) ; } catch ( Exception $ exception ) { if ( $ request instanceof InternalRequest ) { throw $ exception ; } $ this -> exception -> report ( $ exception ) ; $ response = $ this -> exception -> handle ( $ exception ) ; } return $ this -> prepareResponse ( $ response , $ request , $ request -> format ( ) ) ; }
Dispatch a request via the adapter.

@param \Dingo\Api\Http\Request $request

@throws \Exception

@return \Dingo\Api\Http\Response
Dispatch a request via the adapter .