Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- use Illuminate\Database\Seeder;
- use Illuminate\Support\Facades\DB;
- class ParentChildSeeder extends Seeder
- {
- /**
- * Run the database seeds.
- *
- * @return void
- */
- public function run()
- {
- DB::table('parent_child')->insert([
- 'parent_id' => 1,
- 'child_id' => 2,
- ]);
- DB::table('parent_child')->insert([
- 'parent_id' => 1,
- 'child_id' => 3,
- ]);
- DB::table('parent_child')->insert([
- 'parent_id' => 2,
- 'child_id' => 4,
- ]);
- DB::table('parent_child')->insert([
- 'parent_id' => 2,
- 'child_id' => 5,
- ]);
- DB::table('parent_child')->insert([
- 'parent_id' => 2,
- 'child_id' => 6,
- ]);
- DB::table('parent_child')->insert([
- 'parent_id' => 3,
- 'child_id' => 7,
- ]);
- DB::table('parent_child')->insert([
- 'parent_id' => 3,
- 'child_id' => 8,
- ]);
- DB::table('parent_child')->insert([
- 'parent_id' => 3,
- 'child_id' => 9,
- ]);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement