@@ -55,7 +55,7 @@ |
||
| 55 | 55 | case 3: |
| 56 | 56 | $this->resetPage(); |
| 57 | 57 | $role_id = $this->role ?? null; |
| 58 | - $data = $role_id == '' ? $default : $default->whereHas('roles', function ($query) use ($role_id) { |
|
| 58 | + $data = $role_id == '' ? $default : $default->whereHas('roles', function($query) use ($role_id) { |
|
| 59 | 59 | $query->where('role_id', $role_id); |
| 60 | 60 | }); |
| 61 | 61 | break; |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | { |
| 19 | 19 | if (auth()->user()->isSuperAdmin()) { |
| 20 | 20 | return $next($request); |
| 21 | - } elseif (! in_array(url()->current(), session()->get('verified_routes') ?? [])) { |
|
| 21 | + } elseif (!in_array(url()->current(), session()->get('verified_routes') ?? [])) { |
|
| 22 | 22 | session()->put('destination_password', $password); |
| 23 | 23 | session()->put('destination_route', url()->current()); |
| 24 | 24 | session()->put('destination_route_name', $request->route()->getName()); |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | $version_lc = strtolower($version); |
| 39 | 39 | $swagger_json_content = self::generateSwaggerJsonContentContent($name)['content']; |
| 40 | 40 | $required_fields = self::generateSwaggerJsonContentContent($name)['required_fields']; |
| 41 | - if (! file_exists($dir_path = app_path('Http/Controllers/Api/'.trim($version).'/Restful'))) { |
|
| 41 | + if (!file_exists($dir_path = app_path('Http/Controllers/Api/'.trim($version).'/Restful'))) { |
|
| 42 | 42 | mkdir($dir_path, 0777, true); |
| 43 | 43 | } |
| 44 | 44 | |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | // Making API Resource |
| 88 | 88 | self::makeAPIResource($name, $path, $version); |
| 89 | 89 | // Making Controller |
| 90 | - if (! file_exists($dir_path = app_path('Http/Controllers/Api/'.trim($version).'/Client'))) { |
|
| 90 | + if (!file_exists($dir_path = app_path('Http/Controllers/Api/'.trim($version).'/Client'))) { |
|
| 91 | 91 | mkdir($dir_path, 0777, true); |
| 92 | 92 | } |
| 93 | 93 | $controllerTemplate = str_replace( |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | { |
| 117 | 117 | $version = ucfirst($version); |
| 118 | 118 | $version_lc = strtolower($version); |
| 119 | - if (! file_exists($dir_path = app_path("/Http/Resources/{$version}/{$name}"))) { |
|
| 119 | + if (!file_exists($dir_path = app_path("/Http/Resources/{$version}/{$name}"))) { |
|
| 120 | 120 | mkdir($dir_path, 0777, true); |
| 121 | 121 | } |
| 122 | 122 | // Making Collection |
@@ -175,13 +175,13 @@ discard block |
||
| 175 | 175 | $swagger_json_content = []; |
| 176 | 176 | |
| 177 | 177 | foreach ($columns as $column) { |
| 178 | - if (! is_null($column)) { |
|
| 178 | + if (!is_null($column)) { |
|
| 179 | 179 | $null = $column->Null == 'No' ? 'true' : 'false'; |
| 180 | 180 | $field_name = $column->Field; |
| 181 | 181 | $field_type = $column->Type; |
| 182 | 182 | $field_default = $column->Default; |
| 183 | 183 | $example = DB::table($table)->count() > 0 ? DB::table($table)->first()->$field_name : ''; |
| 184 | - if (! in_array($field_name, ['created_at', 'updated_at']) && ! in_array($field_type, ['longtext'])) { |
|
| 184 | + if (!in_array($field_name, ['created_at', 'updated_at']) && !in_array($field_type, ['longtext'])) { |
|
| 185 | 185 | if ($null != 'No') { |
| 186 | 186 | $required_fields[] = '"'.$field_name.'"'; |
| 187 | 187 | } |
@@ -8,7 +8,7 @@ |
||
| 8 | 8 | { |
| 9 | 9 | public function scopeSearch(Builder $builder, string $term = '') |
| 10 | 10 | { |
| 11 | - if (! $this->searchable) { |
|
| 11 | + if (!$this->searchable) { |
|
| 12 | 12 | throw new Exception('Please define the searchable property . '); |
| 13 | 13 | } |
| 14 | 14 | foreach ($this->searchable as $searchable) { |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | 'message' => $error, |
| 41 | 41 | ]; |
| 42 | 42 | |
| 43 | - if (! empty($errorMessages)) { |
|
| 43 | + if (!empty($errorMessages)) { |
|
| 44 | 44 | $response['data'] = $errorMessages; |
| 45 | 45 | } |
| 46 | 46 | |
@@ -25,10 +25,10 @@ |
||
| 25 | 25 | |
| 26 | 26 | public function preferenceChanged(User $user, Preference $preference) |
| 27 | 27 | { |
| 28 | - $user->preferences()->updateExistingPivot($preference->id, ['enabled' => ! $this->enabled], false); |
|
| 28 | + $user->preferences()->updateExistingPivot($preference->id, ['enabled' => !$this->enabled], false); |
|
| 29 | 29 | |
| 30 | 30 | $this->preference = $preference; |
| 31 | - $this->enabled = ! $this->enabled; |
|
| 31 | + $this->enabled = !$this->enabled; |
|
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | public function render() |
@@ -15,11 +15,11 @@ |
||
| 15 | 15 | { |
| 16 | 16 | parent::boot(); |
| 17 | 17 | |
| 18 | - static::saving(function () { |
|
| 18 | + static::saving(function() { |
|
| 19 | 19 | self::cacheKey(); |
| 20 | 20 | }); |
| 21 | 21 | |
| 22 | - static::deleting(function () { |
|
| 22 | + static::deleting(function() { |
|
| 23 | 23 | self::cacheKey(); |
| 24 | 24 | }); |
| 25 | 25 | } |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | $path = $this->option('path') ?? 'Models'; |
| 46 | 46 | $models = getAllModelNames(app_path($path)); |
| 47 | 47 | foreach ($models as $name) { |
| 48 | - if (Schema::hasTable(Str::plural($name)) && ! in_array($name, $excluded_models ?? [])) { |
|
| 48 | + if (Schema::hasTable(Str::plural($name)) && !in_array($name, $excluded_models ?? [])) { |
|
| 49 | 49 | $path = $this->getModelPath($name); |
| 50 | 50 | $version = $this->option('v'); |
| 51 | 51 | if ($this->option('rest')) { |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::create('data', function (Blueprint $table) { |
|
| 16 | + Schema::create('data', function(Blueprint $table) { |
|
| 17 | 17 | $table->id(); |
| 18 | 18 | $table->string('name'); |
| 19 | 19 | $table->json('content')->nullable(); |