Completed
Push — master ( 39d8f5...f43223 )
by Travis
02:07
created

UserSeeder   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 35
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
B run() 0 31 1
1
<?php
2
3
use Illuminate\Database\Seeder;
4
5
class UserSeeder extends Seeder
6
{
7
8
    public function run()
9
    {
10
        // Uncomment the below to wipe the table clean before populating
11
        DB::statement('SET FOREIGN_KEY_CHECKS=0;');
12
        DB::table('users')->truncate();
13
        DB::statement('SET FOREIGN_KEY_CHECKS=1;');
14
15
        $users = [
16
            [
17
                'username'   => 'riddles',
18
                'password'   => bcrypt('test'),
19
                'firstName'  => 'Brandon',
20
                'lastName'   => 'Hyde',
21
                'email'      => '[email protected]',
22
                'timezone'   => 'US/Central',
23
                'created_at' => date('Y-m-d H:i:s'),
24
            ],
25
            [
26
                'username'   => 'Stygian',
27
                'password'   => bcrypt('test'),
28
                'firstName'  => 'Travis',
29
                'lastName'   => 'Blasingame',
30
                'email'      => '[email protected]',
31
                'timezone'   => 'US/Central',
32
                'created_at' => date('Y-m-d H:i:s'),
33
            ],
34
        ];
35
36
        // Uncomment the below to run the seeder
37
        DB::table('users')->insert($users);
38
    }
39
}