| Conditions | 2 |
| Paths | 2 |
| Total Lines | 29 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 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 | } |