diff --git a/app/Console/Commands/SampleData.php b/app/Console/Commands/SampleData.php new file mode 100755 index 000000000..e5017865a --- /dev/null +++ b/app/Console/Commands/SampleData.php @@ -0,0 +1,47 @@ +laravel->make(SampleDataSeeder::class); + + $seeder = $class->setContainer($this->laravel)->setCommand($this); + + $seeder->__invoke(); + } +} diff --git a/database/seeds/SampleData.php b/database/seeds/SampleData.php new file mode 100755 index 000000000..b05d5f994 --- /dev/null +++ b/database/seeds/SampleData.php @@ -0,0 +1,34 @@ +command->option('count'); + + factory(Contact::class, (int)$count)->create(); + factory(Item::class, (int)$count)->create(); + factory(Account::class, (int)$count)->create(); + factory(Bill::class, (int)$count)->create(); + factory(Invoice::class, (int)$count)->create(); + + Model::unguard(); + } +}