mirror of
https://github.com/ZorgCC/lumen-generators.git
synced 2024-12-30 15:45:30 +03:00
a9c12e9fa0
- Bug fixed: [Undefined index: factory](https://github.com/webNeat/lumen-generators/issues/14) - Feature added: [Check if file already exists before generating it](https://github.com/webNeat/lumen-generators/issues/11) - Feature added: [Support for additional columns like nullableTimestamps() and softDeletes() in migrations](https://github.com/webNeat/lumen-generators/issues/12) - Feature added: [Specifying namespace for `wn:resource` and `wn:resources`](https://github.com/webNeat/lumen-generators/issues/18)
29 lines
983 B
PHP
29 lines
983 B
PHP
<?php
|
|
$I = new AcceptanceTester($scenario);
|
|
|
|
// $I->wantTo('generate a pivot table seeder');
|
|
// $I->runShellCommand('php artisan wn:pivot-seeder tasks ShortTag');
|
|
// $I->seeInShellOutput('ShortTagTaskTableSeeder generated');
|
|
// $I->openFile('./database/seeds/ShortTagTaskTableSeeder.php');
|
|
// $I->seeInThisFile("
|
|
// use Illuminate\Database\Seeder;
|
|
// use Faker\Factory as Faker;
|
|
|
|
// class ShortTagTaskTableSeeder extends Seeder
|
|
// {
|
|
// public function run()
|
|
// {
|
|
// \$faker = Faker::create();
|
|
|
|
// \$firstIds = DB::table('short_tags')->lists('id');
|
|
// \$secondIds = DB::table('tasks')->lists('id');
|
|
|
|
// for(\$i = 0; \$i < 10; \$i++) {
|
|
// DB::table('short_tag_task')->insert([
|
|
// 'short_tag_id' => \$faker->randomElement(\$firstIds),
|
|
// 'task_id' => \$faker->randomElement(\$secondIds)
|
|
// ]);
|
|
// }
|
|
// }
|
|
// }");
|
|
// $I->deleteFile('./database/seeds/ShortTagTaskTableSeeder.php');
|