Completed
Push — master ( 66ae31...360c87 )
by ARCANEDEV
11s
created

RolesTableSeeder::syncRoles()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 18
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 18
rs 9.4285
ccs 0
cts 15
cp 0
cc 2
eloc 11
nc 2
nop 0
crap 6
1
<?php namespace Arcanesoft\Pages\Seeds;
2
3
use Arcanesoft\Auth\Seeds\RolesSeeder;
4
5
/**
6
 * Class     RolesTableSeeder
7
 *
8
 * @package  Arcanesoft\Pages\Seeds
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'        => 'Pages Moderators',
26
                'description' => 'The Pages moderators role.',
27
                'is_locked'   => true,
28
            ],[
29
                'name'        => 'Pages Authors',
30
                'description' => 'The Pages authors role.',
31
                'is_locked'   => true,
32
            ]
33
        ]);
34
35
        $this->syncAdminRole();
36
        $this->syncRoles([
37
            'pages-moderators' => 'pages.',
38
            'pages-authors'    => 'pages.pages.',
39
        ]);
40
    }
41
}
42