public function resolve(string $type, string $resource, array $parameters = [], $version = null)
    {
        $version = $version ?? $this->version;

        if (str_contains($resource, '.')) {
            list($resource, $related) = explode('.', $resource);
            $resourceDefinition = $this->loadRelatedDefinition($version, $resource, $related, $type);
        } else {
            $resourceDefinition = $this->loadDefinition($version, $resource, $type);
        }

        return $this->app->make($resourceDefinition, $parameters);
    }
public function resolve(string $type, string $resource, array $parameters = [], $version = null)
    {
        $version = $version ?? $this->version;

        if (str_contains($resource, '.')) {
            list($resource, $related) = explode('.', $resource);
            $resourceDefinition = $this->loadRelatedDefinition($version, $resource, $related, $type);
        } else {
            $resourceDefinition = $this->loadDefinition($version, $resource, $type);
        }

        return $this->app->make($resourceDefinition, $parameters);
    }
public function resolve ( string $ type , string $ resource , array $ parameters = [ ] , $ version = null ) { $ version = $ version ?? $ this -> version ; if ( str_contains ( $ resource , '.' ) ) { list ( $ resource , $ related ) = explode ( '.' , $ resource ) ; $ resourceDefinition = $ this -> loadRelatedDefinition ( $ version , $ resource , $ related , $ type ) ; } else { $ resourceDefinition = $ this -> loadDefinition ( $ version , $ resource , $ type ) ; } return $ this -> app -> make ( $ resourceDefinition , $ parameters ) ; }
resolves a definition or related definition

@param string $type
@param string $resource
@param array $parameters
@param string|null $version
@return mixed|string
resolves a definition or related definition