@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -$factory->define(App\Modules\V1\Notifications\Notification::class, function (Faker\Generator $faker) { |
|
3 | +$factory->define(App\Modules\V1\Notifications\Notification::class, function(Faker\Generator $faker) { |
|
4 | 4 | return [ |
5 | 5 | 'key' => $faker->randomElement(['low_stock', 'order_added', 'new_request']), |
6 | 6 | 'item_name ' => $faker->randomElement(['User', 'Settings', 'Group']), |
@@ -64,7 +64,7 @@ |
||
64 | 64 | if ($this->cacheConfig && $this->cacheConfig == 'cache') |
65 | 65 | { |
66 | 66 | $page = \Request::get('page') !== null ? \Request::get('page') : '1'; |
67 | - $cacheKey = $name . $page . \Session::get('locale') . serialize($arguments); |
|
67 | + $cacheKey = $name.$page.\Session::get('locale').serialize($arguments); |
|
68 | 68 | return $this->cache->tags([$this->cacheTag])->rememberForever($cacheKey, function() use ($arguments, $name) { |
69 | 69 | return call_user_func_array([$this->repo, $name], $arguments); |
70 | 70 | }); |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -$factory->define(App\Modules\V1\Core\Settings::class, function (Faker\Generator $faker) { |
|
3 | +$factory->define(App\Modules\V1\Core\Settings::class, function(Faker\Generator $faker) { |
|
4 | 4 | return [ |
5 | 5 | 'name' => $faker->randomElement(['Company Name', 'Title', 'Header Image']), |
6 | 6 | 'value' => $faker->word(), |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -$factory->define(App\Modules\V1\Core\Log::class, function (Faker\Generator $faker) { |
|
3 | +$factory->define(App\Modules\V1\Core\Log::class, function(Faker\Generator $faker) { |
|
4 | 4 | return [ |
5 | 5 | 'action' => $faker->randomElement(['create', 'delete', 'update']), |
6 | 6 | 'item_name ' => $faker->randomElement(['User', 'Settings', 'Group']), |
@@ -35,7 +35,7 @@ |
||
35 | 35 | $this->skipPermissionCheck = property_exists($this, 'skipPermissionCheck') ? $this->skipPermissionCheck : []; |
36 | 36 | $this->skipLoginCheck = property_exists($this, 'skipLoginCheck') ? $this->skipLoginCheck : []; |
37 | 37 | $this->repo = call_user_func_array("\Core::{$this->model}", []); |
38 | - $route = explode('@',\Route::currentRouteAction())[1]; |
|
38 | + $route = explode('@', \Route::currentRouteAction())[1]; |
|
39 | 39 | |
40 | 40 | $this->checkPermission($route); |
41 | 41 | $this->setRelations($route); |
@@ -12,7 +12,7 @@ discard block |
||
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 | * List of all route actions that the base api controller |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | * to check before add. |
27 | 27 | * @var array |
28 | 28 | */ |
29 | - protected $validationRules = [ |
|
29 | + protected $validationRules = [ |
|
30 | 30 | 'device_token' => 'required|string|max:255', |
31 | 31 | 'user_id' => 'required|exists:users,id', |
32 | 32 | 'active' => 'boolean' |
@@ -55,7 +55,7 @@ |
||
55 | 55 | $notificationBuilder = new PayloadNotificationBuilder($title); |
56 | 56 | $dataBuilder = new PayloadDataBuilder(); |
57 | 57 | |
58 | - $optionBuilder->setTimeToLive(60*20); |
|
58 | + $optionBuilder->setTimeToLive(60 * 20); |
|
59 | 59 | $notificationBuilder->setBody($message); |
60 | 60 | $dataBuilder->addData($data); |
61 | 61 |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -$factory->define(App\Modules\V1\Notifications\PushNotificationDevice::class, function (Faker\Generator $faker) { |
|
3 | +$factory->define(App\Modules\V1\Notifications\PushNotificationDevice::class, function(Faker\Generator $faker) { |
|
4 | 4 | return [ |
5 | 5 | 'device_token' => $faker->sha1(), |
6 | 6 | 'user_id' => $faker->randomDigitNotNull(), |
@@ -12,7 +12,7 @@ |
||
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 | 17 | $table->string('device_token'); |
18 | 18 | $table->integer('user_id'); |