vendor/laravel/framework/src/Illuminate/Routing/Router.php
/**
     * Dispatch the request to a route and return the response.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return mixed
     */
Dispatch the request to a route and return the response.
@param  \Illuminate\Http\Request  $request
@return mixed
Dispatch the request to a route and return the response . @param \ Illuminate \ Http \ Request $request @return mixed
public function dispatchToRoute(Request $request)
    {
        $route = $this->findRoute($request);
        $request->setRouteResolver(function () use ($route) {
            return $route;
        });
        $this->events->dispatch(new Events\RouteMatched($route, $request));
        $response = $this->runRouteWithinStack($route, $request);
        return $this->prepareResponse($request, $response);
    }
public function dispatchToRoute ( Request $ request ) { $ route = $ this -> findRoute ( $ request ) ; $ request -> setRouteResolver ( function ( ) use ( $ route ) { return $ route ; } ) ; $ this -> events -> dispatch ( new Events \ RouteMatched ( $ route , $ request ) ) ; $ response = $ this -> runRouteWithinStack ( $ route , $ request ) ; return $ this -> prepareResponse ( $ request , $ response ) ; }
Dispatch the request to a route and return the response.
Dispatch the request to a route and return the response .
// First we will find a route that matches this request. We will also set the // route resolver on the request so middlewares assigned to the route will // receive access to this route instance for checking of the parameters.