public function writeSeedOut(OutputInterface $output, $force)
    {
        $class      = $this->getClass();
        $modelClass = $this->getModelClass();

        $fileName = $class . '.php';

        list($structure, $data, $count) = $this->renderData();

        if ($count > 0) {
            $this->writeToFileFromTemplate($this->path . '/' . $fileName, 'seeder', $output, [
                'use'       => $modelClass,
                'className' => $this->getClass(),
                'tableName' => snake_case($this->table->getTableName()),
                'model'     => class_basename($modelClass),
                'structure' => var_export($structure, true),
                'count'     => $count,
            ], $force);

            $this->writeToFileFromTemplate($this->path . '/data/' . snake_case($this->table->getTableName()) . '_table_data.php', 'seederData', $output, [
                'data' => $data,
            ], $force);
        }
    }
public function writeSeedOut(OutputInterface $output, $force)
    {
        $class      = $this->getClass();
        $modelClass = $this->getModelClass();

        $fileName = $class . '.php';

        list($structure, $data, $count) = $this->renderData();

        if ($count > 0) {
            $this->writeToFileFromTemplate($this->path . '/' . $fileName, 'seeder', $output, [
                'use'       => $modelClass,
                'className' => $this->getClass(),
                'tableName' => snake_case($this->table->getTableName()),
                'model'     => class_basename($modelClass),
                'structure' => var_export($structure, true),
                'count'     => $count,
            ], $force);

            $this->writeToFileFromTemplate($this->path . '/data/' . snake_case($this->table->getTableName()) . '_table_data.php', 'seederData', $output, [
                'data' => $data,
            ], $force);
        }
    }
public function writeSeedOut ( OutputInterface $ output , $ force ) { $ class = $ this -> getClass ( ) ; $ modelClass = $ this -> getModelClass ( ) ; $ fileName = $ class . '.php' ; list ( $ structure , $ data , $ count ) = $ this -> renderData ( ) ; if ( $ count > 0 ) { $ this -> writeToFileFromTemplate ( $ this -> path . '/' . $ fileName , 'seeder' , $ output , [ 'use' => $ modelClass , 'className' => $ this -> getClass ( ) , 'tableName' => snake_case ( $ this -> table -> getTableName ( ) ) , 'model' => class_basename ( $ modelClass ) , 'structure' => var_export ( $ structure , true ) , 'count' => $ count , ] , $ force ) ; $ this -> writeToFileFromTemplate ( $ this -> path . '/data/' . snake_case ( $ this -> table -> getTableName ( ) ) . '_table_data.php' , 'seederData' , $ output , [ 'data' => $ data , ] , $ force ) ; } }
Render seed class and write out to file

@param \Symfony\Component\Console\Output\OutputInterface|null $output command line output
@param bool                                                   $force  force overwrite existing models or not
Render seed class and write out to file