src/Resource.php
public function shallow(self $resource)
    {
        $newResource = new self;
        $resource->forget();
        $routes = $resource->all();

        foreach ($routes as $route) {
            if (strpos("index make create", $route->getAction()[1]) !== false) {
                $newResource->set($route);
            }
        }

        return $this->nest($newResource);
    }
public function shallow(self $resource)
    {
        $newResource = new self;
        $resource->forget();
        $routes = $resource->all();

        foreach ($routes as $route) {
            if (strpos("index make create", $route->getAction()[1]) !== false) {
                $newResource->set($route);
            }
        }

        return $this->nest($newResource);
    }
public function shallow ( self $ resource ) { $ newResource = new self ; $ resource -> forget ( ) ; $ routes = $ resource -> all ( ) ; foreach ( $ routes as $ route ) { if ( strpos ( "index make create" , $ route -> getAction ( ) [ 1 ] ) !== false ) { $ newResource -> set ( $ route ) ; } } return $ this -> nest ( $ newResource ) ; }
Nest resources but with only build routes with the minimal amount of information
to uniquely identify the resource.

@param self $resource
@return self
Nest resources but with only build routes with the minimal amount of information to uniquely identify the resource .