PackageRolesTableSeeder::run()   B
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 29
Code Lines 13

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 29
rs 8.8571
c 0
b 0
f 0
cc 2
eloc 13
nc 2
nop 0
1
<?php
2
3
use Illuminate\Database\Seeder;
4
5
class PackageRolesTableSeeder extends Seeder {
6
7
    public function run()
8
    {
9
        $seeds = [
10
            [
11
                'role_name'    => 'Administrator',
12
                'description'  => 'Site Admin',
13
            ],
14
            [
15
                'role_name'    => 'Editor',
16
                'description'  => 'News Editor and Publisher',
17
18
            ],
19
            [
20
                'role_name'    => 'Reporter',
21
                'description'  => 'News Reporter',
22
            ],
23
            [
24
                'role_name'    => 'Subscriber',
25
                'description'  => 'News Subscriber',
26
            ]
27
        ];
28
29
        $role = config('guardian.roleModel');
30
31
        foreach($seeds as $seed)
32
        {
33
            $role::create($seed);
34
        }
35
    }
36
37
}