QuizzesTableSeeder   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 32
c 1
b 0
f 0
dl 0
loc 47
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 39 1
1
<?php
2
3
use Illuminate\Database\Seeder;
4
5
class QuizzesTableSeeder extends Seeder
6
{
7
    private $table = '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
            'quiz_name' => 'Data Structures & Algorithms',
19
            'quiz_description' => 'This is a quiz to test your knowledge on Data Structures & Algorithms',
20
            'quiz_pin' => '1234',
21
            'active'  => '0',
22
            'total_plays' => '0',
23
            'created_at' => date('Y-m-d H:i:s'),
24
            'updated_at' => date('Y-m-d H:i:s')
25
        ],
26
        [
27
            'quiz_name' => 'Discrete Mathematics & Functional Programmimg',
28
            'quiz_description' => 'This is a quiz to test your knowledge on Discrete Mathematics & Functional Programming',
29
            'quiz_pin' => '2345',
30
            'active'  => '1',
31
            'total_plays' => '5',
32
            'created_at' => date('Y-m-d H:i:s'),
33
            'updated_at' => date('Y-m-d H:i:s')
34
        ],
35
        [
36
            'quiz_name' => 'Colours of the rainbow',
37
            'quiz_description' => 'Fancy a challenge? Then test your knowhow on the colours of the rainbow',
38
            'quiz_pin' => '3456',
39
            'active'  => '1',
40
            'total_plays' => '228',
41
            'created_at' => date('Y-m-d H:i:s'),
42
            'updated_at' => date('Y-m-d H:i:s')
43
        ],
44
        [
45
            'quiz_name' => 'The Demo Quiz!',
46
            'quiz_description' => 'This is just for the demo quiz. It contains three questions.',
47
            'quiz_pin' => '9876',
48
            'active'  => '1',
49
            'total_plays' => '0',
50
            'created_at' => date('Y-m-d H:i:s'),
51
            'updated_at' => date('Y-m-d H:i:s')
52
        ]
53
        ]);
54
    }
55
}
56