@@ -5,27 +5,27 @@ |
||
5 | 5 | |
6 | 6 | class PasswordResets extends Migration |
7 | 7 | { |
8 | - /** |
|
9 | - * Run the migrations. |
|
10 | - * |
|
11 | - * @return void |
|
12 | - */ |
|
13 | - public function up() |
|
14 | - { |
|
15 | - Schema::create('password_resets', function (Blueprint $table) { |
|
16 | - $table->string('email')->index(); |
|
17 | - $table->string('token')->index(); |
|
18 | - $table->timestamp('created_at'); |
|
19 | - }); |
|
20 | - } |
|
8 | + /** |
|
9 | + * Run the migrations. |
|
10 | + * |
|
11 | + * @return void |
|
12 | + */ |
|
13 | + public function up() |
|
14 | + { |
|
15 | + Schema::create('password_resets', function (Blueprint $table) { |
|
16 | + $table->string('email')->index(); |
|
17 | + $table->string('token')->index(); |
|
18 | + $table->timestamp('created_at'); |
|
19 | + }); |
|
20 | + } |
|
21 | 21 | |
22 | - /** |
|
23 | - * Reverse the migrations. |
|
24 | - * |
|
25 | - * @return void |
|
26 | - */ |
|
27 | - public function down() |
|
28 | - { |
|
29 | - Schema::drop('password_resets'); |
|
30 | - } |
|
22 | + /** |
|
23 | + * Reverse the migrations. |
|
24 | + * |
|
25 | + * @return void |
|
26 | + */ |
|
27 | + public function down() |
|
28 | + { |
|
29 | + Schema::drop('password_resets'); |
|
30 | + } |
|
31 | 31 | } |
@@ -12,7 +12,7 @@ |
||
12 | 12 | */ |
13 | 13 | public function up() |
14 | 14 | { |
15 | - Schema::create('password_resets', function (Blueprint $table) { |
|
15 | + Schema::create('password_resets', function(Blueprint $table) { |
|
16 | 16 | $table->string('email')->index(); |
17 | 17 | $table->string('token')->index(); |
18 | 18 | $table->timestamp('created_at'); |
@@ -13,15 +13,15 @@ |
||
13 | 13 | public function up() |
14 | 14 | { |
15 | 15 | Schema::create('users', function (Blueprint $table) { |
16 | - $table->increments('id'); |
|
17 | - $table->string('name',100)->nullable(); |
|
18 | - $table->string('email')->unique(); |
|
19 | - $table->string('password', 60); |
|
20 | - $table->boolean('blocked', 0); |
|
21 | - $table->softDeletes(); |
|
22 | - $table->rememberToken(); |
|
23 | - $table->timestamps(); |
|
24 | - }); |
|
16 | + $table->increments('id'); |
|
17 | + $table->string('name',100)->nullable(); |
|
18 | + $table->string('email')->unique(); |
|
19 | + $table->string('password', 60); |
|
20 | + $table->boolean('blocked', 0); |
|
21 | + $table->softDeletes(); |
|
22 | + $table->rememberToken(); |
|
23 | + $table->timestamps(); |
|
24 | + }); |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | /** |
@@ -12,9 +12,9 @@ |
||
12 | 12 | */ |
13 | 13 | public function up() |
14 | 14 | { |
15 | - Schema::create('users', function (Blueprint $table) { |
|
15 | + Schema::create('users', function(Blueprint $table) { |
|
16 | 16 | $table->increments('id'); |
17 | - $table->string('name',100)->nullable(); |
|
17 | + $table->string('name', 100)->nullable(); |
|
18 | 18 | $table->string('email')->unique(); |
19 | 19 | $table->string('password', 60); |
20 | 20 | $table->boolean('blocked', 0); |
@@ -6,26 +6,26 @@ |
||
6 | 6 | |
7 | 7 | class ApiSkeletonServiceProvider extends ServiceProvider |
8 | 8 | { |
9 | - /** |
|
10 | - * Perform post-registration booting of services. |
|
11 | - * |
|
12 | - * @return void |
|
13 | - */ |
|
14 | - public function boot() |
|
15 | - { |
|
16 | - $this->publishes([ |
|
17 | - __DIR__.'/Modules' => app_path('Modules'), |
|
18 | - __DIR__.'/Modules/V1/Acl/emails' => base_path('resources/views/auth/emails'), |
|
19 | - ]); |
|
20 | - } |
|
9 | + /** |
|
10 | + * Perform post-registration booting of services. |
|
11 | + * |
|
12 | + * @return void |
|
13 | + */ |
|
14 | + public function boot() |
|
15 | + { |
|
16 | + $this->publishes([ |
|
17 | + __DIR__.'/Modules' => app_path('Modules'), |
|
18 | + __DIR__.'/Modules/V1/Acl/emails' => base_path('resources/views/auth/emails'), |
|
19 | + ]); |
|
20 | + } |
|
21 | 21 | |
22 | - /** |
|
23 | - * Register any package services. |
|
24 | - * |
|
25 | - * @return void |
|
26 | - */ |
|
27 | - public function register() |
|
28 | - { |
|
29 | - // |
|
30 | - } |
|
22 | + /** |
|
23 | + * Register any package services. |
|
24 | + * |
|
25 | + * @return void |
|
26 | + */ |
|
27 | + public function register() |
|
28 | + { |
|
29 | + // |
|
30 | + } |
|
31 | 31 | } |
32 | 32 | \ No newline at end of file |
@@ -5,59 +5,59 @@ |
||
5 | 5 | */ |
6 | 6 | class SettingsObserver { |
7 | 7 | |
8 | - public function saving($model) |
|
9 | - { |
|
10 | - // |
|
11 | - } |
|
12 | - |
|
13 | - public function saved($model) |
|
14 | - { |
|
15 | - // |
|
16 | - } |
|
17 | - |
|
18 | - /** |
|
19 | - * Prevent the creating of the settings. |
|
20 | - * |
|
21 | - * @param object $model the model beign created. |
|
22 | - * @return void |
|
23 | - */ |
|
24 | - public function creating($model) |
|
25 | - { |
|
26 | - \ErrorHandler::cannotCreateSetting(); |
|
27 | - } |
|
28 | - |
|
29 | - public function created($model) |
|
30 | - { |
|
31 | - // |
|
32 | - } |
|
33 | - |
|
34 | - /** |
|
35 | - * Prevent updating of the setting key. |
|
36 | - * |
|
37 | - * @param object $model the model beign updated. |
|
38 | - * @return void |
|
39 | - */ |
|
40 | - public function updating($model) |
|
41 | - { |
|
42 | - if ($model->getOriginal()['key'] !== $model->key) |
|
43 | - { |
|
44 | - \ErrorHandler::cannotUpdateSettingKey(); |
|
45 | - } |
|
46 | - } |
|
47 | - |
|
48 | - public function updated($model) |
|
49 | - { |
|
50 | - // |
|
51 | - } |
|
52 | - |
|
53 | - public function deleting($model) |
|
54 | - { |
|
55 | - // |
|
56 | - } |
|
57 | - |
|
58 | - public function deleted($model) |
|
59 | - { |
|
60 | - // |
|
61 | - } |
|
8 | + public function saving($model) |
|
9 | + { |
|
10 | + // |
|
11 | + } |
|
12 | + |
|
13 | + public function saved($model) |
|
14 | + { |
|
15 | + // |
|
16 | + } |
|
17 | + |
|
18 | + /** |
|
19 | + * Prevent the creating of the settings. |
|
20 | + * |
|
21 | + * @param object $model the model beign created. |
|
22 | + * @return void |
|
23 | + */ |
|
24 | + public function creating($model) |
|
25 | + { |
|
26 | + \ErrorHandler::cannotCreateSetting(); |
|
27 | + } |
|
28 | + |
|
29 | + public function created($model) |
|
30 | + { |
|
31 | + // |
|
32 | + } |
|
33 | + |
|
34 | + /** |
|
35 | + * Prevent updating of the setting key. |
|
36 | + * |
|
37 | + * @param object $model the model beign updated. |
|
38 | + * @return void |
|
39 | + */ |
|
40 | + public function updating($model) |
|
41 | + { |
|
42 | + if ($model->getOriginal()['key'] !== $model->key) |
|
43 | + { |
|
44 | + \ErrorHandler::cannotUpdateSettingKey(); |
|
45 | + } |
|
46 | + } |
|
47 | + |
|
48 | + public function updated($model) |
|
49 | + { |
|
50 | + // |
|
51 | + } |
|
52 | + |
|
53 | + public function deleting($model) |
|
54 | + { |
|
55 | + // |
|
56 | + } |
|
57 | + |
|
58 | + public function deleted($model) |
|
59 | + { |
|
60 | + // |
|
61 | + } |
|
62 | 62 | |
63 | 63 | } |
64 | 64 | \ No newline at end of file |
@@ -2,7 +2,7 @@ |
||
2 | 2 | |
3 | 3 | use App\Modules\V1\Core\AbstractRepositories\AbstractRepositoryContainer; |
4 | 4 | |
5 | -class Core extends AbstractRepositoryContainer{ |
|
5 | +class Core extends AbstractRepositoryContainer { |
|
6 | 6 | /** |
7 | 7 | * Specify module repositories name space. |
8 | 8 | * |
@@ -2,17 +2,17 @@ |
||
2 | 2 | |
3 | 3 | class Logging |
4 | 4 | { |
5 | - public function saveLog($action, $item_name, $item_type, $item_id) |
|
6 | - { |
|
7 | - if (\Core::logs() && $item_name !== 'Log') |
|
8 | - { |
|
9 | - \Core::logs()->save([ |
|
10 | - 'action' => $action, |
|
11 | - 'item_name' => $item_name, |
|
12 | - 'item_type' => $item_type, |
|
13 | - 'item_id' => $item_id, |
|
14 | - 'user_id' => \JWTAuth::parseToken()->authenticate()->id, |
|
15 | - ], false, false); |
|
16 | - } |
|
17 | - } |
|
5 | + public function saveLog($action, $item_name, $item_type, $item_id) |
|
6 | + { |
|
7 | + if (\Core::logs() && $item_name !== 'Log') |
|
8 | + { |
|
9 | + \Core::logs()->save([ |
|
10 | + 'action' => $action, |
|
11 | + 'item_name' => $item_name, |
|
12 | + 'item_type' => $item_type, |
|
13 | + 'item_id' => $item_id, |
|
14 | + 'user_id' => \JWTAuth::parseToken()->authenticate()->id, |
|
15 | + ], false, false); |
|
16 | + } |
|
17 | + } |
|
18 | 18 | } |
19 | 19 | \ No newline at end of file |
@@ -5,44 +5,44 @@ |
||
5 | 5 | */ |
6 | 6 | class LogObserver { |
7 | 7 | |
8 | - public function saving($model) |
|
9 | - { |
|
10 | - // |
|
11 | - } |
|
12 | - |
|
13 | - public function saved($model) |
|
14 | - { |
|
15 | - // |
|
16 | - } |
|
17 | - |
|
18 | - public function creating($model) |
|
19 | - { |
|
20 | - // |
|
21 | - } |
|
22 | - |
|
23 | - public function created($model) |
|
24 | - { |
|
25 | - // |
|
26 | - } |
|
27 | - |
|
28 | - public function updating($model) |
|
29 | - { |
|
30 | - // |
|
31 | - } |
|
32 | - |
|
33 | - public function updated($model) |
|
34 | - { |
|
35 | - // |
|
36 | - } |
|
37 | - |
|
38 | - public function deleting($model) |
|
39 | - { |
|
40 | - // |
|
41 | - } |
|
42 | - |
|
43 | - public function deleted($model) |
|
44 | - { |
|
45 | - // |
|
46 | - } |
|
8 | + public function saving($model) |
|
9 | + { |
|
10 | + // |
|
11 | + } |
|
12 | + |
|
13 | + public function saved($model) |
|
14 | + { |
|
15 | + // |
|
16 | + } |
|
17 | + |
|
18 | + public function creating($model) |
|
19 | + { |
|
20 | + // |
|
21 | + } |
|
22 | + |
|
23 | + public function created($model) |
|
24 | + { |
|
25 | + // |
|
26 | + } |
|
27 | + |
|
28 | + public function updating($model) |
|
29 | + { |
|
30 | + // |
|
31 | + } |
|
32 | + |
|
33 | + public function updated($model) |
|
34 | + { |
|
35 | + // |
|
36 | + } |
|
37 | + |
|
38 | + public function deleting($model) |
|
39 | + { |
|
40 | + // |
|
41 | + } |
|
42 | + |
|
43 | + public function deleted($model) |
|
44 | + { |
|
45 | + // |
|
46 | + } |
|
47 | 47 | |
48 | 48 | } |
49 | 49 | \ No newline at end of file |
@@ -18,7 +18,7 @@ |
||
18 | 18 | $table->string('view_name',100); |
19 | 19 | $table->softDeletes(); |
20 | 20 | $table->timestamps(); |
21 | - }); |
|
21 | + }); |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | /** |
@@ -12,9 +12,9 @@ |
||
12 | 12 | */ |
13 | 13 | public function up() |
14 | 14 | { |
15 | - Schema::create('push_notifications_devices', function (Blueprint $table) { |
|
15 | + Schema::create('push_notifications_devices', function(Blueprint $table) { |
|
16 | 16 | $table->increments('id'); |
17 | - $table->string('device_token',255); |
|
17 | + $table->string('device_token', 255); |
|
18 | 18 | $table->enum('device_type', ['android', 'ios']); |
19 | 19 | $table->integer('user_id'); |
20 | 20 | $table->boolean('active')->default(1); |
@@ -7,22 +7,22 @@ |
||
7 | 7 | |
8 | 8 | class PushNotificationsDevicesController extends BaseApiController |
9 | 9 | { |
10 | - /** |
|
11 | - * The name of the model that is used by the base api controller |
|
12 | - * to preform actions like (add, edit ... etc). |
|
13 | - * @var string |
|
14 | - */ |
|
15 | - protected $model = 'pushNotificationDevices'; |
|
10 | + /** |
|
11 | + * The name of the model that is used by the base api controller |
|
12 | + * to preform actions like (add, edit ... etc). |
|
13 | + * @var string |
|
14 | + */ |
|
15 | + protected $model = 'pushNotificationDevices'; |
|
16 | 16 | |
17 | - /** |
|
18 | - * The validations rules used by the base api controller |
|
19 | - * to check before add. |
|
20 | - * @var array |
|
21 | - */ |
|
22 | - protected $validationRules = [ |
|
23 | - 'device_token' => 'required|string|max:255', |
|
24 | - 'device_type' => 'required|in:android,ios', |
|
25 | - 'user_id' => 'required|exists:users,id', |
|
26 | - 'active' => 'boolean' |
|
27 | - ]; |
|
17 | + /** |
|
18 | + * The validations rules used by the base api controller |
|
19 | + * to check before add. |
|
20 | + * @var array |
|
21 | + */ |
|
22 | + protected $validationRules = [ |
|
23 | + 'device_token' => 'required|string|max:255', |
|
24 | + 'device_type' => 'required|in:android,ios', |
|
25 | + 'user_id' => 'required|exists:users,id', |
|
26 | + 'active' => 'boolean' |
|
27 | + ]; |
|
28 | 28 | } |
@@ -12,14 +12,14 @@ |
||
12 | 12 | * to preform actions like (add, edit ... etc). |
13 | 13 | * @var string |
14 | 14 | */ |
15 | - protected $model = 'pushNotificationDevices'; |
|
15 | + protected $model = 'pushNotificationDevices'; |
|
16 | 16 | |
17 | 17 | /** |
18 | 18 | * The validations rules used by the base api controller |
19 | 19 | * to check before add. |
20 | 20 | * @var array |
21 | 21 | */ |
22 | - protected $validationRules = [ |
|
22 | + protected $validationRules = [ |
|
23 | 23 | 'device_token' => 'required|string|max:255', |
24 | 24 | 'device_type' => 'required|in:android,ios', |
25 | 25 | 'user_id' => 'required|exists:users,id', |