Completed
Push — master ( 02d451...2ce496 )
by Sherif
02:39
created

NotificationsTableSeeder::run()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 67
Code Lines 38

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 67
rs 9.2815
c 0
b 0
f 0
cc 1
eloc 38
nc 1
nop 0

How to fix   Long Method   

Long Method

Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.

For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.

Commonly applied refactorings include:

1
<?php
2
3
use Illuminate\Database\Seeder;
4
5
class NotificationsTableSeeder extends Seeder
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
6
{
7
    /**
8
     * Run the database seeds.
9
     *
10
     * @return void
11
     */
12
    public function run()
13
    {
14
    	/**
15
         * Insert the permissions related to settings table.
16
         */
17
        DB::table('permissions')->insert(
18
        	[
19
        		/**
20
        		 * notifications model permissions.
21
        		 */
22
	        	[
23
	        	'name'       => 'find',
24
	        	'model'      => 'notifications',
25
	        	'created_at' => \DB::raw('NOW()'),
26
	        	'updated_at' => \DB::raw('NOW()')
27
	        	],
28
	        	[
29
	        	'name'       => 'search',
30
	        	'model'      => 'notifications',
31
	        	'created_at' => \DB::raw('NOW()'),
32
	        	'updated_at' => \DB::raw('NOW()')
33
	        	],
34
	        	[
35
	        	'name'       => 'list',
36
	        	'model'      => 'notifications',
37
	        	'created_at' => \DB::raw('NOW()'),
38
	        	'updated_at' => \DB::raw('NOW()')
39
	        	],
40
	        	[
41
	        	'name'       => 'findby',
42
	        	'model'      => 'notifications',
43
	        	'created_at' => \DB::raw('NOW()'),
44
	        	'updated_at' => \DB::raw('NOW()')
45
	        	],
46
	        	[
47
	        	'name'       => 'first',
48
	        	'model'      => 'notifications',
49
	        	'created_at' => \DB::raw('NOW()'),
50
	        	'updated_at' => \DB::raw('NOW()')
51
	        	],
52
	        	[
53
	        	'name'       => 'paginate',
54
	        	'model'      => 'notifications',
55
	        	'created_at' => \DB::raw('NOW()'),
56
	        	'updated_at' => \DB::raw('NOW()')
57
	        	],
58
	        	[
59
	        	'name'       => 'paginateby',
60
	        	'model'      => 'notifications',
61
	        	'created_at' => \DB::raw('NOW()'),
62
	        	'updated_at' => \DB::raw('NOW()')
63
	        	],
64
	        	[
65
	        	'name'       => 'notified',
66
	        	'model'      => 'notifications',
67
	        	'created_at' => \DB::raw('NOW()'),
68
	        	'updated_at' => \DB::raw('NOW()')
69
	        	],
70
	        	[
71
	        	'name'       => 'notifyall',
72
	        	'model'      => 'notifications',
73
	        	'created_at' => \DB::raw('NOW()'),
74
	        	'updated_at' => \DB::raw('NOW()')
75
	        	]
76
        	]
77
        );
78
    }
79
}
80