src/Resource.php
public function nest(self $resource)
    {
        foreach ($this->routes as $route) {
            if ($route->getAction()[1] === "show") {
                $this->set($resource->forget()->setPrefix($this->getNestedPrefix($route->getPattern()))); break;
            }
        }

        return $this;
    }
public function nest(self $resource)
    {
        foreach ($this->routes as $route) {
            if ($route->getAction()[1] === "show") {
                $this->set($resource->forget()->setPrefix($this->getNestedPrefix($route->getPattern()))); break;
            }
        }

        return $this;
    }
public function nest ( self $ resource ) { foreach ( $ this -> routes as $ route ) { if ( $ route -> getAction ( ) [ 1 ] === "show" ) { $ this -> set ( $ resource -> forget ( ) -> setPrefix ( $ this -> getNestedPrefix ( $ route -> getPattern ( ) ) ) ) ; break ; } } return $ this ; }
Nested routes capture the relation between a resource and another resource.

@param self $resource
@return self
Nested routes capture the relation between a resource and another resource .