Completed
Push — master ( 8023d3...8b2ccd )
by Sherif
10:04
created
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.
Database/Seeds/PushNotificationDevicesTableSeeder.php 1 patch
Indentation   +60 added lines, -60 removed lines patch added patch discarded remove patch
@@ -6,64 +6,64 @@
 block discarded – undo
6 6
 
7 7
 class PushNotificationDevicesTableSeeder 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
-                 * pushNotificationDevices model permissions.
23
-                 */
24
-                [
25
-                'name'       => 'index',
26
-                'model'      => 'pushNotificationDevice',
27
-                'created_at' => \DB::raw('NOW()'),
28
-                'updated_at' => \DB::raw('NOW()')
29
-                ],
30
-                [
31
-                'name'       => 'show',
32
-                'model'      => 'pushNotificationDevice',
33
-                'created_at' => \DB::raw('NOW()'),
34
-                'updated_at' => \DB::raw('NOW()')
35
-                ],
36
-                [
37
-                'name'       => 'store',
38
-                'model'      => 'pushNotificationDevice',
39
-                'created_at' => \DB::raw('NOW()'),
40
-                'updated_at' => \DB::raw('NOW()')
41
-                ],
42
-                [
43
-                'name'       => 'update',
44
-                'model'      => 'pushNotificationDevice',
45
-                'created_at' => \DB::raw('NOW()'),
46
-                'updated_at' => \DB::raw('NOW()')
47
-                ],
48
-                [
49
-                'name'       => 'delete',
50
-                'model'      => 'pushNotificationDevice',
51
-                'created_at' => \DB::raw('NOW()'),
52
-                'updated_at' => \DB::raw('NOW()')
53
-                ],
54
-                [
55
-                'name'       => 'deleted',
56
-                'model'      => 'pushNotificationDevice',
57
-                'created_at' => \DB::raw('NOW()'),
58
-                'updated_at' => \DB::raw('NOW()')
59
-                ],
60
-                [
61
-                'name'       => 'restore',
62
-                'model'      => 'pushNotificationDevice',
63
-                'created_at' => \DB::raw('NOW()'),
64
-                'updated_at' => \DB::raw('NOW()')
65
-                ]
66
-            ]
67
-        );
68
-    }
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
+				 * pushNotificationDevices model permissions.
23
+				 */
24
+				[
25
+				'name'       => 'index',
26
+				'model'      => 'pushNotificationDevice',
27
+				'created_at' => \DB::raw('NOW()'),
28
+				'updated_at' => \DB::raw('NOW()')
29
+				],
30
+				[
31
+				'name'       => 'show',
32
+				'model'      => 'pushNotificationDevice',
33
+				'created_at' => \DB::raw('NOW()'),
34
+				'updated_at' => \DB::raw('NOW()')
35
+				],
36
+				[
37
+				'name'       => 'store',
38
+				'model'      => 'pushNotificationDevice',
39
+				'created_at' => \DB::raw('NOW()'),
40
+				'updated_at' => \DB::raw('NOW()')
41
+				],
42
+				[
43
+				'name'       => 'update',
44
+				'model'      => 'pushNotificationDevice',
45
+				'created_at' => \DB::raw('NOW()'),
46
+				'updated_at' => \DB::raw('NOW()')
47
+				],
48
+				[
49
+				'name'       => 'delete',
50
+				'model'      => 'pushNotificationDevice',
51
+				'created_at' => \DB::raw('NOW()'),
52
+				'updated_at' => \DB::raw('NOW()')
53
+				],
54
+				[
55
+				'name'       => 'deleted',
56
+				'model'      => 'pushNotificationDevice',
57
+				'created_at' => \DB::raw('NOW()'),
58
+				'updated_at' => \DB::raw('NOW()')
59
+				],
60
+				[
61
+				'name'       => 'restore',
62
+				'model'      => 'pushNotificationDevice',
63
+				'created_at' => \DB::raw('NOW()'),
64
+				'updated_at' => \DB::raw('NOW()')
65
+				]
66
+			]
67
+		);
68
+	}
69 69
 }
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/PushNotificationDevices/Routes/api.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -15,11 +15,11 @@
 block discarded – undo
15 15
 
16 16
 Route::group(['prefix' => 'push/notification/devices'], function () {
17 17
         
18
-    Route::get('/', 'PushNotificationDeviceController@index');
19
-    Route::get('{id}', 'PushNotificationDeviceController@show');
20
-    Route::post('/', 'PushNotificationDeviceController@store');
21
-    Route::patch('{id}', 'PushNotificationDeviceController@update');
22
-    Route::delete('{id}', 'PushNotificationDeviceController@destroy');
23
-    Route::patch('{id}/restore', 'PushNotificationDeviceController@restore');
24
-    Route::post('register/device', 'PushNotificationDeviceController@registerDevice');
18
+	Route::get('/', 'PushNotificationDeviceController@index');
19
+	Route::get('{id}', 'PushNotificationDeviceController@show');
20
+	Route::post('/', 'PushNotificationDeviceController@store');
21
+	Route::patch('{id}', 'PushNotificationDeviceController@update');
22
+	Route::delete('{id}', 'PushNotificationDeviceController@destroy');
23
+	Route::patch('{id}/restore', 'PushNotificationDeviceController@restore');
24
+	Route::post('register/device', 'PushNotificationDeviceController@registerDevice');
25 25
 });
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
 */
15 15
 
16
-Route::group(['prefix' => 'push/notification/devices'], function () {
16
+Route::group(['prefix' => 'push/notification/devices'], function() {
17 17
         
18 18
     Route::get('/', 'PushNotificationDeviceController@index');
19 19
     Route::get('{id}', 'PushNotificationDeviceController@show');
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/Console/Commands/Stubs/Module/Routes/api.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -15,10 +15,10 @@
 block discarded – undo
15 15
 
16 16
 Route::group(['prefix' => 'DummyRoutePrefix'], function () {
17 17
 
18
-    Route::get('/', 'DummyController@index');
19
-    Route::get('{id}', 'DummyController@show');
20
-    Route::post('/', 'DummyController@store');
21
-    Route::patch('{id}', 'DummyController@update');
22
-    Route::delete('{id}', 'DummyController@destroy');
23
-    Route::patch('restore/{id}', 'DummyController@restore');
18
+	Route::get('/', 'DummyController@index');
19
+	Route::get('{id}', 'DummyController@show');
20
+	Route::post('/', 'DummyController@store');
21
+	Route::patch('{id}', 'DummyController@update');
22
+	Route::delete('{id}', 'DummyController@destroy');
23
+	Route::patch('restore/{id}', 'DummyController@restore');
24 24
 });
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
 */
15 15
 
16
-Route::group(['prefix' => 'DummyRoutePrefix'], function () {
16
+Route::group(['prefix' => 'DummyRoutePrefix'], function() {
17 17
 
18 18
     Route::get('/', 'DummyController@index');
19 19
     Route::get('{id}', 'DummyController@show');
Please login to merge, or discard this patch.