UserQuizzesTableSeeder::run()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 19
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 10
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 19
rs 9.9332
1
<?php
2
3
use Illuminate\Database\Seeder;
4
5
class UserQuizzesTableSeeder extends Seeder
6
{
7
    private $table = 'user_quizzes';
8
    /**
9
     * Run the database seeds.
10
     *
11
     * @return void
12
     */
13
    public function run()
14
    {
15
        DB::table($this->table)->truncate();
16
        DB::table($this->table)->insert([
17
        [
18
            'user_id' => 1,
19
            'quiz_id' => 1
20
        ],
21
        [
22
            'user_id' => 2,
23
            'quiz_id' => 2
24
        ],
25
        [
26
            'user_id' => 1,
27
            'quiz_id' => 3
28
        ],
29
        [
30
            'user_id' => 1,
31
            'quiz_id' => 4
32
        ]
33
        ]);
34
    }
35
}
36