Skip to content

Commit cebcd02

Browse files
committed
fixed faker command
1 parent b908c5b commit cebcd02

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

console/commands/FakerController.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ public function actionIndex()
2323
$this->stdout('Generating fake data for ' . StringHelper::basename($fakerFile, 'Faker.php') . '...');
2424
for($i = 0; $i < 10; $i++) {
2525
$faker = new $className;
26-
$faker->generateModel();
26+
$model = $faker->generateModel();
27+
if (!$model->save()) {
28+
print_r($model->getErrors());
29+
}
2730
$this->stdout(".");
2831
}
2932
$this->stdout("done.\n", Console::BOLD, Console::FG_GREEN);

0 commit comments

Comments
 (0)