Seeder::call PHP Method

call() public method

Run another seeder
public call ( string $seeder )
$seeder string Seeder classname
    public function call($seeder)
    {
        if ($this->seedPath === null) {
            $this->seedPath = APPPATH . 'database/seeds/';
        }
        $file = $this->seedPath . $seeder . '.php';
        require_once $file;
        $obj = new $seeder();
        $obj->run();
    }

Usage Example

コード例 #1
0
ファイル: Tools.php プロジェクト: sacids/dataManager
 public function seed($name)
 {
     $seeder = new Seeder();
     $seeder->call($name);
 }
All Usage Examples Of Seeder::call