Orangehill\Iseed\Iseed::cleanSection PHP Method

cleanSection() public method

Cleans the iSeed section
public cleanSection ( ) : boolean
return boolean
    public function cleanSection()
    {
        $databaseSeederPath = base_path() . config('iseed::config.path') . '/DatabaseSeeder.php';
        $content = $this->files->get($databaseSeederPath);
        $content = preg_replace("/(\\#iseed_start.+?)\\#iseed_end/us", "#iseed_start\n\t\t#iseed_end", $content);
        return $this->files->put($databaseSeederPath, $content) !== false;
        return false;
    }

Usage Example

Beispiel #1
0
 /**
  * Cleans the iSeed section
  *
  * @return bool 
  * @static 
  */
 public static function cleanSection()
 {
     return \Orangehill\Iseed\Iseed::cleanSection();
 }