UsersTableSeeder::run()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 18
Code Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 12
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 18
rs 9.8666
1
<?php
2
3
use Illuminate\Database\Seeder;
4
5
class UsersTableSeeder extends Seeder
6
{
7
    private $table = 'users';
8
    /**
9
     * Run the database seeds.
10
     *
11
     * @return void
12
     */
13
    public function run()
14
    {
15
        DB::table($this->table)->truncate();
16
         // insert some test user accounts
17
         DB::table($this->table)->insert([
18
         [
19
             'username' => 'quiz_user',
20
             'email'    => '[email protected]',
21
             'password' => bcrypt('secret'),
22
             'created_at' => date('Y-m-d H:i:s'),
23
             'updated_at' => date('Y-m-d H:i:s')
24
         ],
25
         [
26
            'username' => 'quiz_host',
27
            'email'    => '[email protected]',
28
            'password' => bcrypt('secret'),
29
            'created_at' => date('Y-m-d H:i:s'),
30
            'updated_at' => date('Y-m-d H:i:s')
31
         ]
32
        ]);
33
    }
34
}
35