@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | /** |
| 34 | 34 | * @var array Guarded fields |
| 35 | 35 | */ |
| 36 | - protected $guarded = ['*']; |
|
| 36 | + protected $guarded = [ '*' ]; |
|
| 37 | 37 | |
| 38 | 38 | /** |
| 39 | 39 | * @var array Fillable fields |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | public function filterFields($fields) |
| 147 | 147 | { |
| 148 | 148 | $fields->amount_exact->hidden = $this->is_percentage; |
| 149 | - $fields->amount_percentage->hidden = ! $this->is_percentage; |
|
| 149 | + $fields->amount_percentage->hidden = !$this->is_percentage; |
|
| 150 | 150 | } |
| 151 | 151 | |
| 152 | 152 | /** |
@@ -158,9 +158,9 @@ discard block |
||
| 158 | 158 | { |
| 159 | 159 | $categoryProductIds = $this->categories() |
| 160 | 160 | ->select('id') |
| 161 | - ->with(['products' => function ($products) { |
|
| 161 | + ->with([ 'products' => function($products) { |
|
| 162 | 162 | return $products->select('id'); |
| 163 | - }]) |
|
| 163 | + } ]) |
|
| 164 | 164 | ->lists('categories.products.id'); |
| 165 | 165 | |
| 166 | 166 | $productIds = $this->products()->lists('id'); |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | $id = $this->id; |
| 179 | 179 | $productIds = $this->getAllProductIds(); |
| 180 | 180 | |
| 181 | - Queue::push(function ($job) use ($id, $productIds) { |
|
| 181 | + Queue::push(function($job) use ($id, $productIds) { |
|
| 182 | 182 | $discount = Discount::findOrFail($id); |
| 183 | 183 | $products = Product::whereIn('id', $productIds)->select('id', 'base_price')->get(); |
| 184 | 184 | |