public function create($timestamps = true, $softDeletes = false, $fields=[])
    {
        $path = $this->getpath($this->name);

        if ($this->files->exists($path)) {
            throw new \Exception("Factory [$this->name] already exists!");
        }

        $stub = $this->files->get($this->getStub());

        $stub = $this->replaceClass($stub, $this->name)
            ->replaceNamespace($stub, $this->name)
            ->replaceFakerArray($stub, $fields, $timestamps, $softDeletes)
            ->replaceSpace($stub);

        $this->files->put($path, $stub);

        return $path;
    }
public function create($timestamps = true, $softDeletes = false, $fields=[])
    {
        $path = $this->getpath($this->name);

        if ($this->files->exists($path)) {
            throw new \Exception("Factory [$this->name] already exists!");
        }

        $stub = $this->files->get($this->getStub());

        $stub = $this->replaceClass($stub, $this->name)
            ->replaceNamespace($stub, $this->name)
            ->replaceFakerArray($stub, $fields, $timestamps, $softDeletes)
            ->replaceSpace($stub);

        $this->files->put($path, $stub);

        return $path;
    }
public function create ( $ timestamps = true , $ softDeletes = false , $ fields = [ ] ) { $ path = $ this -> getpath ( $ this -> name ) ; if ( $ this -> files -> exists ( $ path ) ) { throw new \ Exception ( "Factory [$this->name] already exists!" ) ; } $ stub = $ this -> files -> get ( $ this -> getStub ( ) ) ; $ stub = $ this -> replaceClass ( $ stub , $ this -> name ) -> replaceNamespace ( $ stub , $ this -> name ) -> replaceFakerArray ( $ stub , $ fields , $ timestamps , $ softDeletes ) -> replaceSpace ( $ stub ) ; $ this -> files -> put ( $ path , $ stub ) ; return $ path ; }
Create a new factory file.

@param string     $keyName
@param bool|true  $timestamps
@param bool|false $softDeletes

@throws \Exception

@return string
Create a new factory file .