Skip to content

Commit

Permalink
fixed #68 : seeder bug
Browse files Browse the repository at this point in the history
  • Loading branch information
agungsugiarto committed Jul 19, 2020
1 parent 721d216 commit f6d073d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Commands/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace agungsugiarto\boilerplate\Commands;

use CodeIgniter\CLI\BaseCommand;
use Config\Database;

/**
* Class InstallCommand.
Expand Down Expand Up @@ -66,7 +67,8 @@ public function run(array $params)
// migrate all first
$this->call('migrate');
// then seed data
$this->call('db:seed', ['agungsugiarto\boilerplate\Database\Seeds\BoilerplateSeeder']);
$seeder = Database::seeder();
$seeder->call('agungsugiarto\boilerplate\Database\Seeds\BoilerplateSeeder');
} catch (\Exception $e) {
$this->showError($e);
}
Expand Down

0 comments on commit f6d073d

Please sign in to comment.