/** * Seeds that database with a specific seeder. * * @param string $name */ public function seed(string $name) { return $this->seeder->call($name); }
/** * Runs the specified Seeder file to populate the database * with some data. * * @param string $seedName */ public function seed(string $seedName = null) { $seeder = new Seeder(new \Config\Database()); if (empty($seedName)) { $seedName = CLI::prompt('Seeder name'); } if (empty($seedName)) { CLI::error('You must provide a seeder name.'); return; } try { $seeder->call($seedName); } catch (\Exception $e) { $this->showError($e); } }