src/Schema/NodeRegistry.php
public function registerModel(string $typeName, string $modelName): self
    {
        $this->nodeResolver[$typeName] = function ($id) use ($modelName) {
            return $modelName::find($id);
        };

        return $this;
    }
public function registerModel(string $typeName, string $modelName): self
    {
        $this->nodeResolver[$typeName] = function ($id) use ($modelName) {
            return $modelName::find($id);
        };

        return $this;
    }
public function registerModel ( string $ typeName , string $ modelName ) : self { $ this -> nodeResolver [ $ typeName ] = function ( $ id ) use ( $ modelName ) { return $ modelName :: find ( $ id ) ; } ; return $ this ; }
Register an Eloquent model that can be resolved as a Node.

@param  string  $typeName
@param  string  $modelName
@return $this
Register an Eloquent model that can be resolved as a Node .