src/Gzero/Core/DynamicRouter.php
public function handleRequest(Request $request, Language $language)
    {
        $uri   = $this->getRequestedPath($request, $language);
        $route = $this->repository->getByPath($uri, $language->code);

        if (empty($route) || $route->getRoutable() === null) {
            throw new NotFoundHttpException();
        }

        if (!$this->routeCanBeShown($route)) {
            throw new NotFoundHttpException();
        }

        event(new RouteMatched($route, $request));

        return $route->getRoutable()->handle($language);
    }
public function handleRequest(Request $request, Language $language)
    {
        $uri   = $this->getRequestedPath($request, $language);
        $route = $this->repository->getByPath($uri, $language->code);

        if (empty($route) || $route->getRoutable() === null) {
            throw new NotFoundHttpException();
        }

        if (!$this->routeCanBeShown($route)) {
            throw new NotFoundHttpException();
        }

        event(new RouteMatched($route, $request));

        return $route->getRoutable()->handle($language);
    }
public function handleRequest ( Request $ request , Language $ language ) { $ uri = $ this -> getRequestedPath ( $ request , $ language ) ; $ route = $ this -> repository -> getByPath ( $ uri , $ language -> code ) ; if ( empty ( $ route ) || $ route -> getRoutable ( ) === null ) { throw new NotFoundHttpException ( ) ; } if ( ! $ this -> routeCanBeShown ( $ route ) ) { throw new NotFoundHttpException ( ) ; } event ( new RouteMatched ( $ route , $ request ) ) ; return $ route -> getRoutable ( ) -> handle ( $ language ) ; }
Handles dynamic content rendering

@param Request  $request  Request
@param Language $language Lang entity

@throws NotFoundHttpException
@return Response
Handles dynamic content rendering