Completed
Push — master ( 0f747c...09a64e )
by Sherif
01:52
created
src/Modules/Notifications/Database/Seeds/NotificationsTableSeeder.php 1 patch
Indentation   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -6,46 +6,46 @@
 block discarded – undo
6 6
 
7 7
 class NotificationsTableSeeder extends Seeder
8 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
-                 * notifications model permissions.
23
-                 */
24
-                [
25
-                'name'       => 'index',
26
-                'model'      => 'notification',
27
-                'created_at' => \DB::raw('NOW()'),
28
-                'updated_at' => \DB::raw('NOW()')
29
-                ],
30
-                [
31
-                'name'       => 'unread',
32
-                'model'      => 'notification',
33
-                'created_at' => \DB::raw('NOW()'),
34
-                'updated_at' => \DB::raw('NOW()')
35
-                ],
36
-                [
37
-                'name'       => 'markAsRead',
38
-                'model'      => 'notification',
39
-                'created_at' => \DB::raw('NOW()'),
40
-                'updated_at' => \DB::raw('NOW()')
41
-                ],
42
-                [
43
-                'name'       => 'markAllAsRead',
44
-                'model'      => 'notification',
45
-                'created_at' => \DB::raw('NOW()'),
46
-                'updated_at' => \DB::raw('NOW()')
47
-                ]
48
-            ]
49
-        );
50
-    }
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
+				 * notifications model permissions.
23
+				 */
24
+				[
25
+				'name'       => 'index',
26
+				'model'      => 'notification',
27
+				'created_at' => \DB::raw('NOW()'),
28
+				'updated_at' => \DB::raw('NOW()')
29
+				],
30
+				[
31
+				'name'       => 'unread',
32
+				'model'      => 'notification',
33
+				'created_at' => \DB::raw('NOW()'),
34
+				'updated_at' => \DB::raw('NOW()')
35
+				],
36
+				[
37
+				'name'       => 'markAsRead',
38
+				'model'      => 'notification',
39
+				'created_at' => \DB::raw('NOW()'),
40
+				'updated_at' => \DB::raw('NOW()')
41
+				],
42
+				[
43
+				'name'       => 'markAllAsRead',
44
+				'model'      => 'notification',
45
+				'created_at' => \DB::raw('NOW()'),
46
+				'updated_at' => \DB::raw('NOW()')
47
+				]
48
+			]
49
+		);
50
+	}
51 51
 }
Please login to merge, or discard this patch.
src/Modules/Reporting/Database/Seeds/ReportsTableSeeder.php 1 patch
Indentation   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -6,40 +6,40 @@
 block discarded – undo
6 6
 
7 7
 class ReportsTableSeeder extends Seeder
8 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
-                 * Reports model permissions.
23
-                 */
24
-                [
25
-                'name'       => 'index',
26
-                'model'      => 'report',
27
-                'created_at' => \DB::raw('NOW()'),
28
-                'updated_at' => \DB::raw('NOW()')
29
-                ],
30
-                [
31
-                'name'       => 'show',
32
-                'model'      => 'report',
33
-                'created_at' => \DB::raw('NOW()'),
34
-                'updated_at' => \DB::raw('NOW()')
35
-                ],
36
-                [
37
-                'name'       => 'admin_count',
38
-                'model'      => 'report',
39
-                'created_at' => \DB::raw('NOW()'),
40
-                'updated_at' => \DB::raw('NOW()')
41
-                ]
42
-            ]
43
-        );
44
-    }
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
+				 * Reports model permissions.
23
+				 */
24
+				[
25
+				'name'       => 'index',
26
+				'model'      => 'report',
27
+				'created_at' => \DB::raw('NOW()'),
28
+				'updated_at' => \DB::raw('NOW()')
29
+				],
30
+				[
31
+				'name'       => 'show',
32
+				'model'      => 'report',
33
+				'created_at' => \DB::raw('NOW()'),
34
+				'updated_at' => \DB::raw('NOW()')
35
+				],
36
+				[
37
+				'name'       => 'admin_count',
38
+				'model'      => 'report',
39
+				'created_at' => \DB::raw('NOW()'),
40
+				'updated_at' => \DB::raw('NOW()')
41
+				]
42
+			]
43
+		);
44
+	}
45 45
 }
Please login to merge, or discard this patch.
src/Modules/Reporting/Routes/api.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 
14 14
 Route::group(['prefix' => 'reports'], function () {
15 15
         
16
-    Route::get('/', 'ReportController@index');
17
-    Route::get('/{id}', 'ReportController@show');
18
-    Route::post('get/{reportName}', 'ReportController@getReport');
16
+	Route::get('/', 'ReportController@index');
17
+	Route::get('/{id}', 'ReportController@show');
18
+	Route::post('get/{reportName}', 'ReportController@getReport');
19 19
 });
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 |
12 12
 */
13 13
 
14
-Route::group(['prefix' => 'reports'], function () {
14
+Route::group(['prefix' => 'reports'], function() {
15 15
         
16 16
     Route::get('/', 'ReportController@index');
17 17
     Route::get('/{id}', 'ReportController@show');
Please login to merge, or discard this patch.
Http/Controllers/PushNotificationDeviceController.php 1 patch
Indentation   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -8,46 +8,46 @@
 block discarded – undo
8 8
 
9 9
 class PushNotificationDeviceController extends BaseApiController
10 10
 {
11
-    /**
12
-     * Path of the sotre form request.
13
-     *
14
-     * @var string
15
-     */
16
-    protected $storeFormRequest = 'App\Modules\Users\Http\PushNotificationDevices\StorePushNotificationDevice';
11
+	/**
12
+	 * Path of the sotre form request.
13
+	 *
14
+	 * @var string
15
+	 */
16
+	protected $storeFormRequest = 'App\Modules\Users\Http\PushNotificationDevices\StorePushNotificationDevice';
17 17
 
18
-    /**
19
-     * Path of the model resource
20
-     *
21
-     * @var string
22
-     */
23
-    protected $modelResource = 'App\Modules\PushNotificationDevices\Http\Resources\PushNotificationDevice';
18
+	/**
19
+	 * Path of the model resource
20
+	 *
21
+	 * @var string
22
+	 */
23
+	protected $modelResource = 'App\Modules\PushNotificationDevices\Http\Resources\PushNotificationDevice';
24 24
 
25
-    /**
26
-     * List of all route actions that the base api controller
27
-     * will skip permissions check for them.
28
-     * @var array
29
-     */
30
-    protected $skipPermissionCheck = ['registerDevice'];
25
+	/**
26
+	 * List of all route actions that the base api controller
27
+	 * will skip permissions check for them.
28
+	 * @var array
29
+	 */
30
+	protected $skipPermissionCheck = ['registerDevice'];
31 31
 
32
-    /**
33
-     * Init new object.
34
-     *
35
-     * @param   PushNotificationDeviceService $service
36
-     * @return  void
37
-     */
38
-    public function __construct(PushNotificationDeviceService $service)
39
-    {
40
-        parent::__construct($service);
41
-    }
32
+	/**
33
+	 * Init new object.
34
+	 *
35
+	 * @param   PushNotificationDeviceService $service
36
+	 * @return  void
37
+	 */
38
+	public function __construct(PushNotificationDeviceService $service)
39
+	{
40
+		parent::__construct($service);
41
+	}
42 42
 
43
-    /**
44
-     * Register the given device to the logged in user.
45
-     *
46
-     * @param RegisterDevice $request
47
-     * @return \Illuminate\Http\Response
48
-     */
49
-    public function registerDevice(RegisterDevice $request)
50
-    {
51
-        return new $this->modelResource($this->service->registerDevice($request->all()));
52
-    }
43
+	/**
44
+	 * Register the given device to the logged in user.
45
+	 *
46
+	 * @param RegisterDevice $request
47
+	 * @return \Illuminate\Http\Response
48
+	 */
49
+	public function registerDevice(RegisterDevice $request)
50
+	{
51
+		return new $this->modelResource($this->service->registerDevice($request->all()));
52
+	}
53 53
 }
Please login to merge, or discard this patch.
PushNotificationDevices/Http/Requests/StorePushNotificationDevice.php 1 patch
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -6,26 +6,26 @@
 block discarded – undo
6 6
 
7 7
 class StorePushNotificationDevice extends FormRequest
8 8
 {
9
-    /**
10
-     * Determine if the user is authorized to make this request.
11
-     *
12
-     * @return bool
13
-     */
14
-    public function authorize()
15
-    {
16
-        return true;
17
-    }
9
+	/**
10
+	 * Determine if the user is authorized to make this request.
11
+	 *
12
+	 * @return bool
13
+	 */
14
+	public function authorize()
15
+	{
16
+		return true;
17
+	}
18 18
 
19
-    /**
20
-     * Get the validation rules that apply to the request.
21
-     *
22
-     * @return array
23
-     */
24
-    public function rules()
25
-    {
26
-        return [
27
-            'device_token' => 'required|string|max:255',
28
-            'user_id'      => 'required|exists:users,id'
29
-        ];
30
-    }
19
+	/**
20
+	 * Get the validation rules that apply to the request.
21
+	 *
22
+	 * @return array
23
+	 */
24
+	public function rules()
25
+	{
26
+		return [
27
+			'device_token' => 'required|string|max:255',
28
+			'user_id'      => 'required|exists:users,id'
29
+		];
30
+	}
31 31
 }
Please login to merge, or discard this patch.
src/Modules/Core/Database/Seeds/SettingsTableSeeder.php 1 patch
Indentation   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -6,52 +6,52 @@
 block discarded – undo
6 6
 
7 7
 class SettingsTableSeeder extends Seeder
8 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'       => 'show',
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'       => 'destroy',
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
-    }
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'       => 'show',
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'       => 'destroy',
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 57
 }
Please login to merge, or discard this patch.
src/Modules/Core/Http/Controllers/SettingController.php 1 patch
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -9,39 +9,39 @@
 block discarded – undo
9 9
 
10 10
 class SettingController extends BaseApiController
11 11
 {
12
-    /**
13
-     * Path of the sotre form request.
14
-     *
15
-     * @var string
16
-     */
17
-    protected $storeFormRequest = 'App\Modules\Core\Http\Requests\StoreSetting';
12
+	/**
13
+	 * Path of the sotre form request.
14
+	 *
15
+	 * @var string
16
+	 */
17
+	protected $storeFormRequest = 'App\Modules\Core\Http\Requests\StoreSetting';
18 18
 
19
-    /**
20
-     * Path of the model resource
21
-     *
22
-     * @var string
23
-     */
24
-    protected $modelResource = 'App\Modules\Core\Http\Resources\Setting';
19
+	/**
20
+	 * Path of the model resource
21
+	 *
22
+	 * @var string
23
+	 */
24
+	protected $modelResource = 'App\Modules\Core\Http\Resources\Setting';
25 25
 
26
-    /**
27
-     * Init new object.
28
-     *
29
-     * @param   SettingService $service
30
-     * @return  void
31
-     */
32
-    public function __construct(SettingService $service)
33
-    {
34
-        parent::__construct($service);
35
-    }
26
+	/**
27
+	 * Init new object.
28
+	 *
29
+	 * @param   SettingService $service
30
+	 * @return  void
31
+	 */
32
+	public function __construct(SettingService $service)
33
+	{
34
+		parent::__construct($service);
35
+	}
36 36
 
37
-    /**
38
-     * Save list of settings.
39
-     *
40
-     * @param Request $request
41
-     * @return \Illuminate\Http\Response
42
-     */
43
-    public function saveMany(Request $request)
44
-    {
45
-        return new GeneralResource($this->service->saveMany($request->all()));
46
-    }
37
+	/**
38
+	 * Save list of settings.
39
+	 *
40
+	 * @param Request $request
41
+	 * @return \Illuminate\Http\Response
42
+	 */
43
+	public function saveMany(Request $request)
44
+	{
45
+		return new GeneralResource($this->service->saveMany($request->all()));
46
+	}
47 47
 }
Please login to merge, or discard this patch.
src/Modules/Core/Http/Requests/StoreSetting.php 1 patch
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -6,25 +6,25 @@
 block discarded – undo
6 6
 
7 7
 class StoreSetting extends FormRequest
8 8
 {
9
-    /**
10
-     * Determine if the user is authorized to make this request.
11
-     *
12
-     * @return bool
13
-     */
14
-    public function authorize()
15
-    {
16
-        return true;
17
-    }
9
+	/**
10
+	 * Determine if the user is authorized to make this request.
11
+	 *
12
+	 * @return bool
13
+	 */
14
+	public function authorize()
15
+	{
16
+		return true;
17
+	}
18 18
 
19
-    /**
20
-     * Get the validation rules that apply to the request.
21
-     *
22
-     * @return array
23
-     */
24
-    public function rules()
25
-    {
26
-        return [
27
-            'value' => 'required|string'
28
-        ];
29
-    }
19
+	/**
20
+	 * Get the validation rules that apply to the request.
21
+	 *
22
+	 * @return array
23
+	 */
24
+	public function rules()
25
+	{
26
+		return [
27
+			'value' => 'required|string'
28
+		];
29
+	}
30 30
 }
Please login to merge, or discard this patch.
src/Modules/Core/Routes/api.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 |
12 12
 */
13 13
 
14
-Route::group(['prefix' => 'settings'], function () {
14
+Route::group(['prefix' => 'settings'], function() {
15 15
 
16 16
     Route::get('/', 'SettingController@index');
17 17
     Route::get('{id}', 'SettingController@show');
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -13,8 +13,8 @@
 block discarded – undo
13 13
 
14 14
 Route::group(['prefix' => 'settings'], function () {
15 15
 
16
-    Route::get('/', 'SettingController@index');
17
-    Route::get('{id}', 'SettingController@show');
18
-    Route::patch('{id}', 'SettingController@update');
19
-    Route::post('save/many', 'SettingController@saveMany');
16
+	Route::get('/', 'SettingController@index');
17
+	Route::get('{id}', 'SettingController@show');
18
+	Route::patch('{id}', 'SettingController@update');
19
+	Route::post('save/many', 'SettingController@saveMany');
20 20
 });
Please login to merge, or discard this patch.