Completed
Push — master ( 09a64e...d2b124 )
by Sherif
02:30
created
src/Modules/Core/Config/core.php 1 patch
Indentation   +73 added lines, -73 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 
3 3
 return [
4 4
 
5
-    /*
5
+	/*
6 6
     |--------------------------------------------------------------------------
7 7
     | Relations Between Models
8 8
     |--------------------------------------------------------------------------
@@ -11,43 +11,43 @@  discard block
 block discarded – undo
11 11
     |
12 12
     */
13 13
     
14
-    'relations' => [
15
-        'user' => [
16
-            'index' => [],
17
-            'show' => [],
18
-            'account' => [],
19
-        ],
20
-        'permission' => [
21
-            'index' => [],
22
-            'show' => [],
23
-        ],
24
-        'role' => [
25
-            'index' => [],
26
-            'show' => [],
27
-        ],
28
-        'oauthClient' => [
29
-            'index' => [],
30
-            'show' => [],
31
-        ],
32
-        'notification' => [
33
-            'index' => [],
34
-            'unread' => [],
35
-        ],
36
-        'pushNotificationDevice' => [
37
-            'index' => [],
38
-            'show' => [],
39
-        ],
40
-        'report' => [
41
-            'index' => [],
42
-            'show' => [],
43
-        ],
44
-        'setting' => [
45
-            'index' => [],
46
-            'show' => [],
47
-        ],
48
-    ],
14
+	'relations' => [
15
+		'user' => [
16
+			'index' => [],
17
+			'show' => [],
18
+			'account' => [],
19
+		],
20
+		'permission' => [
21
+			'index' => [],
22
+			'show' => [],
23
+		],
24
+		'role' => [
25
+			'index' => [],
26
+			'show' => [],
27
+		],
28
+		'oauthClient' => [
29
+			'index' => [],
30
+			'show' => [],
31
+		],
32
+		'notification' => [
33
+			'index' => [],
34
+			'unread' => [],
35
+		],
36
+		'pushNotificationDevice' => [
37
+			'index' => [],
38
+			'show' => [],
39
+		],
40
+		'report' => [
41
+			'index' => [],
42
+			'show' => [],
43
+		],
44
+		'setting' => [
45
+			'index' => [],
46
+			'show' => [],
47
+		],
48
+	],
49 49
 
50
-    /*
50
+	/*
51 51
     |--------------------------------------------------------------------------
52 52
     | Cache Configurations
53 53
     |--------------------------------------------------------------------------
@@ -56,40 +56,40 @@  discard block
 block discarded – undo
56 56
     |
57 57
     */
58 58
 
59
-    'cache_config' => [
60
-        'oauthClient' => [
61
-            'cache' => [
62
-                'list',
63
-                'find',
64
-                'findBy',
65
-                'paginate',
66
-                'paginateBy',
67
-                'first',
68
-                'deleted'
69
-            ],
70
-            'clear' => [
71
-                'save'             => ['oauthClient'],
72
-                'delete'           => ['oauthClient'],
73
-                'restore'          => ['oauthClient'],
74
-                'revoke'           => ['oauthClient'],
75
-                'ubRevoke'         => ['oauthClient'],
76
-                'regenerateSecret' => ['oauthClient'],
77
-            ],
78
-        ],
79
-        'setting' => [
80
-            'cache' => [
81
-                'list',
82
-                'find',
83
-                'findBy',
84
-                'paginate',
85
-                'paginateBy',
86
-                'first',
87
-                'deleted'
88
-            ],
89
-            'clear' => [
90
-                'save'     => ['setting'],
91
-                'saveMany' => ['setting'],
92
-            ]
93
-        ]
94
-    ]
59
+	'cache_config' => [
60
+		'oauthClient' => [
61
+			'cache' => [
62
+				'list',
63
+				'find',
64
+				'findBy',
65
+				'paginate',
66
+				'paginateBy',
67
+				'first',
68
+				'deleted'
69
+			],
70
+			'clear' => [
71
+				'save'             => ['oauthClient'],
72
+				'delete'           => ['oauthClient'],
73
+				'restore'          => ['oauthClient'],
74
+				'revoke'           => ['oauthClient'],
75
+				'ubRevoke'         => ['oauthClient'],
76
+				'regenerateSecret' => ['oauthClient'],
77
+			],
78
+		],
79
+		'setting' => [
80
+			'cache' => [
81
+				'list',
82
+				'find',
83
+				'findBy',
84
+				'paginate',
85
+				'paginateBy',
86
+				'first',
87
+				'deleted'
88
+			],
89
+			'clear' => [
90
+				'save'     => ['setting'],
91
+				'saveMany' => ['setting'],
92
+			]
93
+		]
94
+	]
95 95
 ];
Please login to merge, or discard this patch.
Modules/Core/Console/Commands/Stubs/Module/Repositories/DummyRepository.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -5,14 +5,14 @@
 block discarded – undo
5 5
 
6 6
 class DummyRepository extends BaseRepository
7 7
 {
8
-    /**
9
-     * Init new object.
10
-     *
11
-     * @param   DummyModel $model
12
-     * @return  void
13
-     */
14
-    public function __construct(DummyModel $model)
15
-    {
16
-        parent::__construct($model);
17
-    }
8
+	/**
9
+	 * Init new object.
10
+	 *
11
+	 * @param   DummyModel $model
12
+	 * @return  void
13
+	 */
14
+	public function __construct(DummyModel $model)
15
+	{
16
+		parent::__construct($model);
17
+	}
18 18
 }
Please login to merge, or discard this patch.
src/Modules/Core/Console/Commands/Stubs/Module/Resources/Lang/ar/errors.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@
 block discarded – undo
2 2
 
3 3
 return [
4 4
     
5
-    /**
6
-     * Here goes your error messages.
7
-     */
5
+	/**
6
+	 * Here goes your error messages.
7
+	 */
8 8
 
9 9
 ];
Please login to merge, or discard this patch.
src/Modules/Core/Console/Commands/Stubs/Module/Resources/Lang/en/errors.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@
 block discarded – undo
2 2
 
3 3
 return [
4 4
     
5
-    /**
6
-     * Here goes your error messages.
7
-     */
5
+	/**
6
+	 * Here goes your error messages.
7
+	 */
8 8
 
9 9
 ];
Please login to merge, or discard this patch.
Notifications/Database/Migrations/2017_10_26_154804_create_jobs_table.php 2 patches
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -6,33 +6,33 @@
 block discarded – undo
6 6
 
7 7
 class CreateJobsTable extends Migration
8 8
 {
9
-    /**
10
-     * Run the migrations.
11
-     *
12
-     * @return void
13
-     */
14
-    public function up()
15
-    {
16
-        Schema::create('jobs', function (Blueprint $table) {
17
-            $table->increments('id');
18
-            $table->string('queue');
19
-            $table->longText('payload');
20
-            $table->tinyInteger('attempts')->unsigned();
21
-            $table->unsignedInteger('reserved_at')->nullable();
22
-            $table->unsignedInteger('available_at');
23
-            $table->unsignedInteger('created_at');
9
+	/**
10
+	 * Run the migrations.
11
+	 *
12
+	 * @return void
13
+	 */
14
+	public function up()
15
+	{
16
+		Schema::create('jobs', function (Blueprint $table) {
17
+			$table->increments('id');
18
+			$table->string('queue');
19
+			$table->longText('payload');
20
+			$table->tinyInteger('attempts')->unsigned();
21
+			$table->unsignedInteger('reserved_at')->nullable();
22
+			$table->unsignedInteger('available_at');
23
+			$table->unsignedInteger('created_at');
24 24
 
25
-            $table->index(['queue', 'reserved_at']);
26
-        });
27
-    }
25
+			$table->index(['queue', 'reserved_at']);
26
+		});
27
+	}
28 28
 
29
-    /**
30
-     * Reverse the migrations.
31
-     *
32
-     * @return void
33
-     */
34
-    public function down()
35
-    {
36
-        Schema::dropIfExists('jobs');
37
-    }
29
+	/**
30
+	 * Reverse the migrations.
31
+	 *
32
+	 * @return void
33
+	 */
34
+	public function down()
35
+	{
36
+		Schema::dropIfExists('jobs');
37
+	}
38 38
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::create('jobs', function (Blueprint $table) {
16
+        Schema::create('jobs', function(Blueprint $table) {
17 17
             $table->increments('id');
18 18
             $table->string('queue');
19 19
             $table->longText('payload');
Please login to merge, or discard this patch.
Database/Migrations/2017_11_22_162811_create_failed_jobs_table.php 2 patches
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -6,30 +6,30 @@
 block discarded – undo
6 6
 
7 7
 class CreateFailedJobsTable extends Migration
8 8
 {
9
-    /**
10
-     * Run the migrations.
11
-     *
12
-     * @return void
13
-     */
14
-    public function up()
15
-    {
16
-        Schema::create('failed_jobs', function (Blueprint $table) {
17
-            $table->increments('id');
18
-            $table->text('connection');
19
-            $table->text('queue');
20
-            $table->longText('payload');
21
-            $table->longText('exception');
22
-            $table->timestamp('failed_at')->useCurrent();
23
-        });
24
-    }
9
+	/**
10
+	 * Run the migrations.
11
+	 *
12
+	 * @return void
13
+	 */
14
+	public function up()
15
+	{
16
+		Schema::create('failed_jobs', function (Blueprint $table) {
17
+			$table->increments('id');
18
+			$table->text('connection');
19
+			$table->text('queue');
20
+			$table->longText('payload');
21
+			$table->longText('exception');
22
+			$table->timestamp('failed_at')->useCurrent();
23
+		});
24
+	}
25 25
 
26
-    /**
27
-     * Reverse the migrations.
28
-     *
29
-     * @return void
30
-     */
31
-    public function down()
32
-    {
33
-        Schema::dropIfExists('failed_jobs');
34
-    }
26
+	/**
27
+	 * Reverse the migrations.
28
+	 *
29
+	 * @return void
30
+	 */
31
+	public function down()
32
+	{
33
+		Schema::dropIfExists('failed_jobs');
34
+	}
35 35
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::create('failed_jobs', function (Blueprint $table) {
16
+        Schema::create('failed_jobs', function(Blueprint $table) {
17 17
             $table->increments('id');
18 18
             $table->text('connection');
19 19
             $table->text('queue');
Please login to merge, or discard this patch.
src/Modules/Users/Database/Seeds/UsersTableSeeder.php 1 patch
Indentation   +78 added lines, -78 removed lines patch added patch discarded remove patch
@@ -8,82 +8,82 @@
 block discarded – undo
8 8
 
9 9
 class UsersTableSeeder extends Seeder
10 10
 {
11
-    /**
12
-     * Run the database seeds.
13
-     *
14
-     * @return void
15
-     */
16
-    public function run()
17
-    {
18
-        /**
19
-         * Insert the permissions related to users table.
20
-         */
21
-        \DB::table('permissions')->insert(
22
-            [
23
-                /**
24
-                 * Users model permissions.
25
-                 */
26
-                [
27
-                'name'       => 'index',
28
-                'model'      => 'user',
29
-                'created_at' => \DB::raw('NOW()'),
30
-                'updated_at' => \DB::raw('NOW()')
31
-                ],
32
-                [
33
-                'name'       => 'show',
34
-                'model'      => 'user',
35
-                'created_at' => \DB::raw('NOW()'),
36
-                'updated_at' => \DB::raw('NOW()')
37
-                ],
38
-                [
39
-                'name'       => 'store',
40
-                'model'      => 'user',
41
-                'created_at' => \DB::raw('NOW()'),
42
-                'updated_at' => \DB::raw('NOW()')
43
-                ],
44
-                [
45
-                'name'       => 'update',
46
-                'model'      => 'user',
47
-                'created_at' => \DB::raw('NOW()'),
48
-                'updated_at' => \DB::raw('NOW()')
49
-                ],
50
-                [
51
-                'name'       => 'destroy',
52
-                'model'      => 'user',
53
-                'created_at' => \DB::raw('NOW()'),
54
-                'updated_at' => \DB::raw('NOW()')
55
-                ],
56
-                [
57
-                'name'       => 'deleted',
58
-                'model'      => 'user',
59
-                'created_at' => \DB::raw('NOW()'),
60
-                'updated_at' => \DB::raw('NOW()')
61
-                ],
62
-                [
63
-                'name'       => 'restore',
64
-                'model'      => 'user',
65
-                'created_at' => \DB::raw('NOW()'),
66
-                'updated_at' => \DB::raw('NOW()')
67
-                ],
68
-                [
69
-                'name'       => 'assignRoles',
70
-                'model'      => 'user',
71
-                'created_at' => \DB::raw('NOW()'),
72
-                'updated_at' => \DB::raw('NOW()')
73
-                ],
74
-                [
75
-                'name'       => 'block',
76
-                'model'      => 'user',
77
-                'created_at' => \DB::raw('NOW()'),
78
-                'updated_at' => \DB::raw('NOW()')
79
-                ],
80
-                [
81
-                'name'       => 'unblock',
82
-                'model'      => 'user',
83
-                'created_at' => \DB::raw('NOW()'),
84
-                'updated_at' => \DB::raw('NOW()')
85
-                ]
86
-            ]
87
-        );
88
-    }
11
+	/**
12
+	 * Run the database seeds.
13
+	 *
14
+	 * @return void
15
+	 */
16
+	public function run()
17
+	{
18
+		/**
19
+		 * Insert the permissions related to users table.
20
+		 */
21
+		\DB::table('permissions')->insert(
22
+			[
23
+				/**
24
+				 * Users model permissions.
25
+				 */
26
+				[
27
+				'name'       => 'index',
28
+				'model'      => 'user',
29
+				'created_at' => \DB::raw('NOW()'),
30
+				'updated_at' => \DB::raw('NOW()')
31
+				],
32
+				[
33
+				'name'       => 'show',
34
+				'model'      => 'user',
35
+				'created_at' => \DB::raw('NOW()'),
36
+				'updated_at' => \DB::raw('NOW()')
37
+				],
38
+				[
39
+				'name'       => 'store',
40
+				'model'      => 'user',
41
+				'created_at' => \DB::raw('NOW()'),
42
+				'updated_at' => \DB::raw('NOW()')
43
+				],
44
+				[
45
+				'name'       => 'update',
46
+				'model'      => 'user',
47
+				'created_at' => \DB::raw('NOW()'),
48
+				'updated_at' => \DB::raw('NOW()')
49
+				],
50
+				[
51
+				'name'       => 'destroy',
52
+				'model'      => 'user',
53
+				'created_at' => \DB::raw('NOW()'),
54
+				'updated_at' => \DB::raw('NOW()')
55
+				],
56
+				[
57
+				'name'       => 'deleted',
58
+				'model'      => 'user',
59
+				'created_at' => \DB::raw('NOW()'),
60
+				'updated_at' => \DB::raw('NOW()')
61
+				],
62
+				[
63
+				'name'       => 'restore',
64
+				'model'      => 'user',
65
+				'created_at' => \DB::raw('NOW()'),
66
+				'updated_at' => \DB::raw('NOW()')
67
+				],
68
+				[
69
+				'name'       => 'assignRoles',
70
+				'model'      => 'user',
71
+				'created_at' => \DB::raw('NOW()'),
72
+				'updated_at' => \DB::raw('NOW()')
73
+				],
74
+				[
75
+				'name'       => 'block',
76
+				'model'      => 'user',
77
+				'created_at' => \DB::raw('NOW()'),
78
+				'updated_at' => \DB::raw('NOW()')
79
+				],
80
+				[
81
+				'name'       => 'unblock',
82
+				'model'      => 'user',
83
+				'created_at' => \DB::raw('NOW()'),
84
+				'updated_at' => \DB::raw('NOW()')
85
+				]
86
+			]
87
+		);
88
+	}
89 89
 }
Please login to merge, or discard this patch.
src/Modules/Users/Config/user.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 
3 3
 return [
4 4
 
5
-    /*
5
+	/*
6 6
     |--------------------------------------------------------------------------
7 7
     | Disable Confirm Email
8 8
     |--------------------------------------------------------------------------
@@ -11,9 +11,9 @@  discard block
 block discarded – undo
11 11
     |
12 12
     */
13 13
 
14
-    'disable_confirm_email' => env('DISABLE_CONFIRM_EMAIL', true),
14
+	'disable_confirm_email' => env('DISABLE_CONFIRM_EMAIL', true),
15 15
 
16
-    /*
16
+	/*
17 17
     |--------------------------------------------------------------------------
18 18
     | Confirm Email URL
19 19
     |--------------------------------------------------------------------------
@@ -22,9 +22,9 @@  discard block
 block discarded – undo
22 22
     |
23 23
     */
24 24
    
25
-    'confrim_email_url' => env('CONFIRM_EMAIL_URL'),
25
+	'confrim_email_url' => env('CONFIRM_EMAIL_URL'),
26 26
 
27
-    /*
27
+	/*
28 28
     |--------------------------------------------------------------------------
29 29
     | Reset Password URL
30 30
     |--------------------------------------------------------------------------
@@ -33,9 +33,9 @@  discard block
 block discarded – undo
33 33
     |
34 34
     */
35 35
    
36
-    'reset_password_url' => env('RESET_PASSWORD_URL'),
36
+	'reset_password_url' => env('RESET_PASSWORD_URL'),
37 37
 
38
-    /*
38
+	/*
39 39
     |--------------------------------------------------------------------------
40 40
     | Passport Client Id
41 41
     |--------------------------------------------------------------------------
@@ -44,9 +44,9 @@  discard block
 block discarded – undo
44 44
     |
45 45
     */
46 46
    
47
-    'passport_client_id' => env('PASSWORD_CLIENT_ID'),
47
+	'passport_client_id' => env('PASSWORD_CLIENT_ID'),
48 48
 
49
-    /*
49
+	/*
50 50
     |--------------------------------------------------------------------------
51 51
     | Passport Client Secret
52 52
     |--------------------------------------------------------------------------
@@ -55,9 +55,9 @@  discard block
 block discarded – undo
55 55
     |
56 56
     */
57 57
    
58
-    'passport_client_secret' => env('PASSWORD_CLIENT_SECRET'),
58
+	'passport_client_secret' => env('PASSWORD_CLIENT_SECRET'),
59 59
 
60
-    /*
60
+	/*
61 61
     |--------------------------------------------------------------------------
62 62
     | Token Expire In
63 63
     |--------------------------------------------------------------------------
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
     |
67 67
     */
68 68
 
69
-    /*
69
+	/*
70 70
     |--------------------------------------------------------------------------
71 71
     | Social Pass
72 72
     |--------------------------------------------------------------------------
@@ -75,5 +75,5 @@  discard block
 block discarded – undo
75 75
     |
76 76
     */
77 77
 
78
-    'social_pass' => env('SOCIAL_PASS', false),
78
+	'social_pass' => env('SOCIAL_PASS', false),
79 79
 ];
Please login to merge, or discard this patch.
src/Modules/Roles/Database/Seeds/RolesTableSeeder.php 2 patches
Indentation   +96 added lines, -96 removed lines patch added patch discarded remove patch
@@ -8,103 +8,103 @@
 block discarded – undo
8 8
 
9 9
 class RolesTableSeeder extends Seeder
10 10
 {
11
-    /**
12
-     * Run the database seeds.
13
-     *
14
-     * @return void
15
-     */
16
-    public function run()
17
-    {      
18
-        /**
19
-         * Create Default roles.
20
-         */
21
-        Role::updateOrInsert([
22
-            'name' => RoleEnum::ADMIN,
23
-        ],[
24
-            'created_at' => \DB::raw('NOW()'),
25
-            'updated_at' => \DB::raw('NOW()')
26
-        ]);
11
+	/**
12
+	 * Run the database seeds.
13
+	 *
14
+	 * @return void
15
+	 */
16
+	public function run()
17
+	{      
18
+		/**
19
+		 * Create Default roles.
20
+		 */
21
+		Role::updateOrInsert([
22
+			'name' => RoleEnum::ADMIN,
23
+		],[
24
+			'created_at' => \DB::raw('NOW()'),
25
+			'updated_at' => \DB::raw('NOW()')
26
+		]);
27 27
   
28
-        /**
29
-         * Create Default user.
30
-         */
31
-        AclUser::updateOrInsert([
32
-            'email' => '[email protected]',
33
-        ],[
34
-            'name'       => 'Admin',
35
-            'password'   => \Hash::make('123456'),
36
-            'confirmed'  => 1,
37
-            'created_at' => \DB::raw('NOW()'),
38
-            'updated_at' => \DB::raw('NOW()')
39
-        ]);
28
+		/**
29
+		 * Create Default user.
30
+		 */
31
+		AclUser::updateOrInsert([
32
+			'email' => '[email protected]',
33
+		],[
34
+			'name'       => 'Admin',
35
+			'password'   => \Hash::make('123456'),
36
+			'confirmed'  => 1,
37
+			'created_at' => \DB::raw('NOW()'),
38
+			'updated_at' => \DB::raw('NOW()')
39
+		]);
40 40
 
41
-        /**
42
-         * Assign default users to admin roles.
43
-         */
44
-        $adminRoleId = Role::where('name', RoleEnum::ADMIN)->select('id')->first()->id;;
45
-        $adminUserId = AclUser::where('email', '[email protected]')->select('id')->first()->id;
46
-        \DB::table('role_user')->updateOrInsert([
47
-            'user_id' => $adminUserId,
48
-            'role_id' => $adminRoleId,
49
-        ],[]);
41
+		/**
42
+		 * Assign default users to admin roles.
43
+		 */
44
+		$adminRoleId = Role::where('name', RoleEnum::ADMIN)->select('id')->first()->id;;
45
+		$adminUserId = AclUser::where('email', '[email protected]')->select('id')->first()->id;
46
+		\DB::table('role_user')->updateOrInsert([
47
+			'user_id' => $adminUserId,
48
+			'role_id' => $adminRoleId,
49
+		],[]);
50 50
 
51
-        /**
52
-         * Insert the permissions related to roles table.
53
-         */
54
-        \DB::table('permissions')->insert(
55
-            [
56
-                /**
57
-                 * Roles model permissions.
58
-                 */
59
-                [
60
-                'name'       => 'index',
61
-                'model'      => 'role',
62
-                'created_at' => \DB::raw('NOW()'),
63
-                'updated_at' => \DB::raw('NOW()')
64
-                ],
65
-                [
66
-                'name'       => 'show',
67
-                'model'      => 'role',
68
-                'created_at' => \DB::raw('NOW()'),
69
-                'updated_at' => \DB::raw('NOW()')
70
-                ],
71
-                [
72
-                'name'       => 'store',
73
-                'model'      => 'role',
74
-                'created_at' => \DB::raw('NOW()'),
75
-                'updated_at' => \DB::raw('NOW()')
76
-                ],
77
-                [
78
-                'name'       => 'update',
79
-                'model'      => 'role',
80
-                'created_at' => \DB::raw('NOW()'),
81
-                'updated_at' => \DB::raw('NOW()')
82
-                ],
83
-                [
84
-                'name'       => 'destroy',
85
-                'model'      => 'role',
86
-                'created_at' => \DB::raw('NOW()'),
87
-                'updated_at' => \DB::raw('NOW()')
88
-                ],
89
-                [
90
-                'name'       => 'deleted',
91
-                'model'      => 'role',
92
-                'created_at' => \DB::raw('NOW()'),
93
-                'updated_at' => \DB::raw('NOW()')
94
-                ],
95
-                [
96
-                'name'       => 'restore',
97
-                'model'      => 'role',
98
-                'created_at' => \DB::raw('NOW()'),
99
-                'updated_at' => \DB::raw('NOW()')
100
-                ],
101
-                [
102
-                'name'       => 'assignPermissions',
103
-                'model'      => 'role',
104
-                'created_at' => \DB::raw('NOW()'),
105
-                'updated_at' => \DB::raw('NOW()')
106
-                ],
107
-            ]
108
-        );
109
-    }
51
+		/**
52
+		 * Insert the permissions related to roles table.
53
+		 */
54
+		\DB::table('permissions')->insert(
55
+			[
56
+				/**
57
+				 * Roles model permissions.
58
+				 */
59
+				[
60
+				'name'       => 'index',
61
+				'model'      => 'role',
62
+				'created_at' => \DB::raw('NOW()'),
63
+				'updated_at' => \DB::raw('NOW()')
64
+				],
65
+				[
66
+				'name'       => 'show',
67
+				'model'      => 'role',
68
+				'created_at' => \DB::raw('NOW()'),
69
+				'updated_at' => \DB::raw('NOW()')
70
+				],
71
+				[
72
+				'name'       => 'store',
73
+				'model'      => 'role',
74
+				'created_at' => \DB::raw('NOW()'),
75
+				'updated_at' => \DB::raw('NOW()')
76
+				],
77
+				[
78
+				'name'       => 'update',
79
+				'model'      => 'role',
80
+				'created_at' => \DB::raw('NOW()'),
81
+				'updated_at' => \DB::raw('NOW()')
82
+				],
83
+				[
84
+				'name'       => 'destroy',
85
+				'model'      => 'role',
86
+				'created_at' => \DB::raw('NOW()'),
87
+				'updated_at' => \DB::raw('NOW()')
88
+				],
89
+				[
90
+				'name'       => 'deleted',
91
+				'model'      => 'role',
92
+				'created_at' => \DB::raw('NOW()'),
93
+				'updated_at' => \DB::raw('NOW()')
94
+				],
95
+				[
96
+				'name'       => 'restore',
97
+				'model'      => 'role',
98
+				'created_at' => \DB::raw('NOW()'),
99
+				'updated_at' => \DB::raw('NOW()')
100
+				],
101
+				[
102
+				'name'       => 'assignPermissions',
103
+				'model'      => 'role',
104
+				'created_at' => \DB::raw('NOW()'),
105
+				'updated_at' => \DB::raw('NOW()')
106
+				],
107
+			]
108
+		);
109
+	}
110 110
 }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
          */
21 21
         Role::updateOrInsert([
22 22
             'name' => RoleEnum::ADMIN,
23
-        ],[
23
+        ], [
24 24
             'created_at' => \DB::raw('NOW()'),
25 25
             'updated_at' => \DB::raw('NOW()')
26 26
         ]);
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
          */
31 31
         AclUser::updateOrInsert([
32 32
             'email' => '[email protected]',
33
-        ],[
33
+        ], [
34 34
             'name'       => 'Admin',
35 35
             'password'   => \Hash::make('123456'),
36 36
             'confirmed'  => 1,
@@ -41,12 +41,12 @@  discard block
 block discarded – undo
41 41
         /**
42 42
          * Assign default users to admin roles.
43 43
          */
44
-        $adminRoleId = Role::where('name', RoleEnum::ADMIN)->select('id')->first()->id;;
44
+        $adminRoleId = Role::where('name', RoleEnum::ADMIN)->select('id')->first()->id; ;
45 45
         $adminUserId = AclUser::where('email', '[email protected]')->select('id')->first()->id;
46 46
         \DB::table('role_user')->updateOrInsert([
47 47
             'user_id' => $adminUserId,
48 48
             'role_id' => $adminRoleId,
49
-        ],[]);
49
+        ], []);
50 50
 
51 51
         /**
52 52
          * Insert the permissions related to roles table.
Please login to merge, or discard this patch.