public function updateDatabaseSeederRunMethod($className)
    {
        $databaseSeederPath = app_path() . '/database/seeds/DatabaseSeeder.php';

        $content = $this->file->get($databaseSeederPath);

        if ( ! strpos($content, "\$this->call('{$className}');"))
        {
            $content = preg_replace("/(run\(\).+?)}/us", "$1\t\$this->call('{$className}');\n\t}", $content);
            return $this->file->put($databaseSeederPath, $content);
        }

        return false;
    }
public function updateDatabaseSeederRunMethod($className)
    {
        $databaseSeederPath = app_path() . '/database/seeds/DatabaseSeeder.php';

        $content = $this->file->get($databaseSeederPath);

        if ( ! strpos($content, "\$this->call('{$className}');"))
        {
            $content = preg_replace("/(run\(\).+?)}/us", "$1\t\$this->call('{$className}');\n\t}", $content);
            return $this->file->put($databaseSeederPath, $content);
        }

        return false;
    }
public function updateDatabaseSeederRunMethod ( $ className ) { $ databaseSeederPath = app_path ( ) . '/database/seeds/DatabaseSeeder.php' ; $ content = $ this -> file -> get ( $ databaseSeederPath ) ; if ( ! strpos ( $ content , "\$this->call('{$className}');" ) ) { $ content = preg_replace ( "/(run\(\).+?)}/us" , "$1\t\$this->call('{$className}');\n\t}" , $ content ) ; return $ this -> file -> put ( $ databaseSeederPath , $ content ) ; } return false ; }
Updates the DatabaseSeeder file's run method to
call this new seed class
@return void
Updates the DatabaseSeeder file s run method to call this new seed class