Completed
Push — master ( ef718f...6fab63 )
by ARCANEDEV
06:42
created

RolesTableSeeder::syncRoles()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 19
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 2
eloc 11
c 2
b 0
f 0
nc 2
nop 0
dl 0
loc 19
ccs 0
cts 15
cp 0
crap 6
rs 9.4285
1
<?php namespace Arcanesoft\Foundation\Seeds;
2
3
use Arcanesoft\Auth\Seeds\RolesSeeder;
4
5
/**
6
 * Class     RoleTableSeeder
7
 *
8
 * @package  Arcanesoft\Auth\Seeds\Foundation
9
 * @author   ARCANEDEV <[email protected]>
10
 */
11
class RolesTableSeeder extends RolesSeeder
12
{
13
    /* -----------------------------------------------------------------
14
     |  Main Methods
15
     | -----------------------------------------------------------------
16
     */
17
18
    /**
19
     * Run the database seeds.
20
     */
21
    public function run()
22
    {
23
        $this->seed([
24
            [
25
                'name'        => 'LogViewer Manager',
26
                'description' => 'The LogViewer manager role.',
27
                'is_locked'   => true,
28
            ],
29
            [
30
                'name'        => 'Backups Manager',
31
                'description' => 'The Backups manager role.',
32
                'is_locked'   => true,
33
            ],
34
        ]);
35
36
        $this->syncAdminRole();
37
38
        $this->syncRoles([
39
            'logviewer-manager' => 'foundation.logviewer.',
40
            'backups-manager'   => 'foundation.backups.',
41
        ]);
42
    }
43
}
44