Provider/RouteProvider.php
public function getRouteCollectionForRequest(Request $request)
    {
        $collection = new RouteCollection();
        $path       = $this->getNormalizedPath($request);
        $resource   = $this->repository->findOneBy(['path' => $path]);
        
        if ($resource) {
            $route = $this->createRoute($resource);
            $collection->add(
                self::DYNAMIC_PREFIX . $resource->getId(),
                $route
            );
        }
        
        return $collection;
    }
public function getRouteCollectionForRequest(Request $request)
    {
        $collection = new RouteCollection();
        $path       = $this->getNormalizedPath($request);
        $resource   = $this->repository->findOneBy(['path' => $path]);
        
        if ($resource) {
            $route = $this->createRoute($resource);
            $collection->add(
                self::DYNAMIC_PREFIX . $resource->getId(),
                $route
            );
        }
        
        return $collection;
    }
public function getRouteCollectionForRequest ( Request $ request ) { $ collection = new RouteCollection ( ) ; $ path = $ this -> getNormalizedPath ( $ request ) ; $ resource = $ this -> repository -> findOneBy ( [ 'path' => $ path ] ) ; if ( $ resource ) { $ route = $ this -> createRoute ( $ resource ) ; $ collection -> add ( self :: DYNAMIC_PREFIX . $ resource -> getId ( ) , $ route ) ; } return $ collection ; }
Returns route collection for current request

@param Request $request

@return RouteCollection
Returns route collection for current request