UsersTableSeeder   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 18 1
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