@@ -40,19 +40,19 @@ |
||
| 40 | 40 | /** |
| 41 | 41 | * @var array |
| 42 | 42 | */ |
| 43 | - protected $dates = ['deleted_at']; |
|
| 43 | + protected $dates = [ 'deleted_at' ]; |
|
| 44 | 44 | /** |
| 45 | 45 | * The attributes that are not mass assignable. |
| 46 | 46 | * |
| 47 | 47 | * @var array |
| 48 | 48 | */ |
| 49 | - protected $fillable = ['name', 'capacity', 'make_id', 'warehouse_id']; |
|
| 49 | + protected $fillable = [ 'name', 'capacity', 'make_id', 'warehouse_id' ]; |
|
| 50 | 50 | |
| 51 | 51 | public static function boot() |
| 52 | 52 | { |
| 53 | 53 | parent::boot(); |
| 54 | 54 | |
| 55 | - static::deleting(function (Rack $rack) { |
|
| 55 | + static::deleting(function(Rack $rack) { |
|
| 56 | 56 | $rack->guitars()->delete(); |
| 57 | 57 | }); |
| 58 | 58 | } |
@@ -31,19 +31,19 @@ |
||
| 31 | 31 | /** |
| 32 | 32 | * @var array |
| 33 | 33 | */ |
| 34 | - protected $dates = ['deleted_at']; |
|
| 34 | + protected $dates = [ 'deleted_at' ]; |
|
| 35 | 35 | /** |
| 36 | 36 | * The attributes that are mass assignable. |
| 37 | 37 | * |
| 38 | 38 | * @var array |
| 39 | 39 | */ |
| 40 | - protected $fillable = ['name', 'location']; |
|
| 40 | + protected $fillable = [ 'name', 'location' ]; |
|
| 41 | 41 | |
| 42 | 42 | public static function boot() |
| 43 | 43 | { |
| 44 | 44 | parent::boot(); |
| 45 | 45 | |
| 46 | - static::deleting(function (Supplier $supplier) { |
|
| 46 | + static::deleting(function(Supplier $supplier) { |
|
| 47 | 47 | $supplier->purchases()->delete(); |
| 48 | 48 | }); |
| 49 | 49 | } |
@@ -29,19 +29,19 @@ discard block |
||
| 29 | 29 | /** |
| 30 | 30 | * @var array |
| 31 | 31 | */ |
| 32 | - protected $dates = ['deleted_at']; |
|
| 32 | + protected $dates = [ 'deleted_at' ]; |
|
| 33 | 33 | /** |
| 34 | 34 | * The attributes that are mass assignable. |
| 35 | 35 | * |
| 36 | 36 | * @var array |
| 37 | 37 | */ |
| 38 | - protected $fillable = ['name']; |
|
| 38 | + protected $fillable = [ 'name' ]; |
|
| 39 | 39 | |
| 40 | 40 | public static function boot() |
| 41 | 41 | { |
| 42 | 42 | parent::boot(); |
| 43 | 43 | |
| 44 | - static::deleting(function (Warehouse $warehouse) { |
|
| 44 | + static::deleting(function(Warehouse $warehouse) { |
|
| 45 | 45 | $warehouse->racks()->delete(); |
| 46 | 46 | }); |
| 47 | 47 | } |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | public function addOrUpdateRack($rack) |
| 140 | 140 | { |
| 141 | 141 | (array_has($rack, 'id')) ? |
| 142 | - $this->racks()->find($rack['id'])->update($rack) : $this->addRack($rack); |
|
| 142 | + $this->racks()->find($rack[ 'id' ])->update($rack) : $this->addRack($rack); |
|
| 143 | 143 | |
| 144 | 144 | return $this; |
| 145 | 145 | } |
@@ -49,19 +49,19 @@ discard block |
||
| 49 | 49 | /** |
| 50 | 50 | * @var array |
| 51 | 51 | */ |
| 52 | - protected $dates = ['deleted_at']; |
|
| 52 | + protected $dates = [ 'deleted_at' ]; |
|
| 53 | 53 | /** |
| 54 | 54 | * The attributes that are not mass assignable. |
| 55 | 55 | * |
| 56 | 56 | * @var array |
| 57 | 57 | */ |
| 58 | - protected $guarded = []; |
|
| 58 | + protected $guarded = [ ]; |
|
| 59 | 59 | |
| 60 | 60 | public static function boot() |
| 61 | 61 | { |
| 62 | 62 | parent::boot(); |
| 63 | 63 | |
| 64 | - static::deleting(function (Guitar $guitar) { |
|
| 64 | + static::deleting(function(Guitar $guitar) { |
|
| 65 | 65 | $guitar->sale->delete(); |
| 66 | 66 | }); |
| 67 | 67 | } |
@@ -146,6 +146,6 @@ discard block |
||
| 146 | 146 | */ |
| 147 | 147 | public function isSold() |
| 148 | 148 | { |
| 149 | - return ! is_null($this->sale); |
|
| 149 | + return !is_null($this->sale); |
|
| 150 | 150 | } |
| 151 | 151 | } |
@@ -32,19 +32,19 @@ |
||
| 32 | 32 | /** |
| 33 | 33 | * @var array |
| 34 | 34 | */ |
| 35 | - protected $dates = ['deleted_at']; |
|
| 35 | + protected $dates = [ 'deleted_at' ]; |
|
| 36 | 36 | /** |
| 37 | 37 | * The attributes that are not mass assignable. |
| 38 | 38 | * |
| 39 | 39 | * @var array |
| 40 | 40 | */ |
| 41 | - protected $guarded = []; |
|
| 41 | + protected $guarded = [ ]; |
|
| 42 | 42 | |
| 43 | 43 | public static function boot() |
| 44 | 44 | { |
| 45 | 45 | parent::boot(); |
| 46 | 46 | |
| 47 | - static::deleting(function (Make $make) { |
|
| 47 | + static::deleting(function(Make $make) { |
|
| 48 | 48 | $make->models()->delete(); |
| 49 | 49 | $make->racks()->delete(); |
| 50 | 50 | $make->purchases()->delete(); |
@@ -34,19 +34,19 @@ |
||
| 34 | 34 | /** |
| 35 | 35 | * @var array |
| 36 | 36 | */ |
| 37 | - protected $dates = ['deleted_at']; |
|
| 37 | + protected $dates = [ 'deleted_at' ]; |
|
| 38 | 38 | /** |
| 39 | 39 | * The attributes that are not mass assignable. |
| 40 | 40 | * |
| 41 | 41 | * @var array |
| 42 | 42 | */ |
| 43 | - protected $guarded = []; |
|
| 43 | + protected $guarded = [ ]; |
|
| 44 | 44 | |
| 45 | 45 | public static function boot() |
| 46 | 46 | { |
| 47 | 47 | parent::boot(); |
| 48 | 48 | |
| 49 | - static::deleting(function (Model $model) { |
|
| 49 | + static::deleting(function(Model $model) { |
|
| 50 | 50 | $model->guitars()->delete(); |
| 51 | 51 | }); |
| 52 | 52 | } |
@@ -14,9 +14,9 @@ |
||
| 14 | 14 | { |
| 15 | 15 | \DB::table('warehouses')->delete(); |
| 16 | 16 | |
| 17 | - \DB::table('warehouses')->insert(array ( |
|
| 17 | + \DB::table('warehouses')->insert(array( |
|
| 18 | 18 | 0 => |
| 19 | - array ( |
|
| 19 | + array( |
|
| 20 | 20 | 'id' => 1, |
| 21 | 21 | 'name' => 'Warehouse (Kamalpokhari)', |
| 22 | 22 | 'deleted_at' => NULL, |
@@ -14,9 +14,9 @@ discard block |
||
| 14 | 14 | { |
| 15 | 15 | \DB::table('notifications')->delete(); |
| 16 | 16 | |
| 17 | - \DB::table('notifications')->insert(array ( |
|
| 17 | + \DB::table('notifications')->insert(array( |
|
| 18 | 18 | 0 => |
| 19 | - array ( |
|
| 19 | + array( |
|
| 20 | 20 | 'id' => 1, |
| 21 | 21 | 'icon' => 'flight_land', |
| 22 | 22 | 'link' => '/purchases/1', |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | 'deleted_at' => NULL, |
| 30 | 30 | ), |
| 31 | 31 | 1 => |
| 32 | - array ( |
|
| 32 | + array( |
|
| 33 | 33 | 'id' => 2, |
| 34 | 34 | 'icon' => 'flight_land', |
| 35 | 35 | 'link' => '/purchases/3', |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | 'deleted_at' => NULL, |
| 43 | 43 | ), |
| 44 | 44 | 2 => |
| 45 | - array ( |
|
| 45 | + array( |
|
| 46 | 46 | 'id' => 3, |
| 47 | 47 | 'icon' => 'flight_land', |
| 48 | 48 | 'link' => '/purchases/4', |
@@ -14,9 +14,9 @@ discard block |
||
| 14 | 14 | { |
| 15 | 15 | \DB::table('sales')->delete(); |
| 16 | 16 | |
| 17 | - \DB::table('sales')->insert(array ( |
|
| 17 | + \DB::table('sales')->insert(array( |
|
| 18 | 18 | 0 => |
| 19 | - array ( |
|
| 19 | + array( |
|
| 20 | 20 | 'id' => 1, |
| 21 | 21 | 'guitar_id' => 10, |
| 22 | 22 | 'name' => 'XYZ Shop', |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | 'deleted_at' => NULL, |
| 28 | 28 | ), |
| 29 | 29 | 1 => |
| 30 | - array ( |
|
| 30 | + array( |
|
| 31 | 31 | 'id' => 2, |
| 32 | 32 | 'guitar_id' => 4, |
| 33 | 33 | 'name' => 'Ram Prasad', |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | 'deleted_at' => NULL, |
| 39 | 39 | ), |
| 40 | 40 | 2 => |
| 41 | - array ( |
|
| 41 | + array( |
|
| 42 | 42 | 'id' => 3, |
| 43 | 43 | 'guitar_id' => 37, |
| 44 | 44 | 'name' => 'Nikhil Pandey', |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | 'deleted_at' => NULL, |
| 50 | 50 | ), |
| 51 | 51 | 3 => |
| 52 | - array ( |
|
| 52 | + array( |
|
| 53 | 53 | 'id' => 4, |
| 54 | 54 | 'guitar_id' => 36, |
| 55 | 55 | 'name' => 'John Doe', |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | 'deleted_at' => NULL, |
| 61 | 61 | ), |
| 62 | 62 | 4 => |
| 63 | - array ( |
|
| 63 | + array( |
|
| 64 | 64 | 'id' => 5, |
| 65 | 65 | 'guitar_id' => 35, |
| 66 | 66 | 'name' => 'Jane Doe', |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | 'deleted_at' => NULL, |
| 72 | 72 | ), |
| 73 | 73 | 5 => |
| 74 | - array ( |
|
| 74 | + array( |
|
| 75 | 75 | 'id' => 6, |
| 76 | 76 | 'guitar_id' => 33, |
| 77 | 77 | 'name' => 'Jane Doe', |