Completed
Push — master ( eb2586...ec2395 )
by Sherif
01:59
created

SettingsTableSeeder::run()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 43

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 43
rs 9.232
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace App\Modules\Core\Database\Seeds;
4
5
use Illuminate\Database\Seeder;
6
7
class SettingsTableSeeder extends Seeder
8
{
9
    /**
10
     * Run the database seeds.
11
     *
12
     * @return void
13
     */
14
    public function run()
15
    {
16
        /**
17
         * Insert the permissions related to settings table.
18
         */
19
        \DB::table('permissions')->insert(
20
            [
21
                /**
22
                 * Settings model permissions.
23
                 */
24
                [
25
                'name'       => 'index',
26
                'model'      => 'setting',
27
                'created_at' => \DB::raw('NOW()'),
28
                'updated_at' => \DB::raw('NOW()')
29
                ],
30
                [
31
                'name'       => 'find',
32
                'model'      => 'setting',
33
                'created_at' => \DB::raw('NOW()'),
34
                'updated_at' => \DB::raw('NOW()')
35
                ],
36
                [
37
                'name'       => 'update',
38
                'model'      => 'setting',
39
                'created_at' => \DB::raw('NOW()'),
40
                'updated_at' => \DB::raw('NOW()')
41
                ],
42
                [
43
                'name'       => 'delete',
44
                'model'      => 'setting',
45
                'created_at' => \DB::raw('NOW()'),
46
                'updated_at' => \DB::raw('NOW()')
47
                ],
48
                [
49
                'name'       => 'saveMany',
50
                'model'      => 'setting',
51
                'created_at' => \DB::raw('NOW()'),
52
                'updated_at' => \DB::raw('NOW()')
53
                ]
54
            ]
55
        );
56
    }
57
}
58