src/Generators/EntityGenerator.php
private function factory($name)
    {
        if ($this->factoryMuffin->isPendingOrSaved($this->model)) {
            return $this->factoryMuffin->create($name);
        }

        return $this->factoryMuffin->instance($name);
    }
private function factory($name)
    {
        if ($this->factoryMuffin->isPendingOrSaved($this->model)) {
            return $this->factoryMuffin->create($name);
        }

        return $this->factoryMuffin->instance($name);
    }
private function factory ( $ name ) { if ( $ this -> factoryMuffin -> isPendingOrSaved ( $ this -> model ) ) { return $ this -> factoryMuffin -> create ( $ name ) ; } return $ this -> factoryMuffin -> instance ( $ name ) ; }
Create an instance of the model.

This model will be automatically saved to the database if the model we
are generating it for has been saved (the create function was used).

@param string $name The model definition name.

@return object
Create an instance of the model .