@@ -14,21 +14,21 @@ |
||
| 14 | 14 | { |
| 15 | 15 | use HasFactory; |
| 16 | 16 | |
| 17 | - protected $dates = ["created_at","updated_at"]; |
|
| 17 | + protected $dates = ["created_at", "updated_at"]; |
|
| 18 | 18 | |
| 19 | - public function status(){ |
|
| 20 | - return $this->belongsTo(OrderStatus::class,'status_id'); |
|
| 19 | + public function status() { |
|
| 20 | + return $this->belongsTo(OrderStatus::class, 'status_id'); |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | - public function typePayment(){ |
|
| 24 | - return $this->belongsTo(TypePayment::class,'payment_type_id'); |
|
| 23 | + public function typePayment() { |
|
| 24 | + return $this->belongsTo(TypePayment::class, 'payment_type_id'); |
|
| 25 | 25 | } |
| 26 | 26 | |
| 27 | - public function user(){ |
|
| 28 | - return $this->belongsTo(User::class,'user_id'); |
|
| 27 | + public function user() { |
|
| 28 | + return $this->belongsTo(User::class, 'user_id'); |
|
| 29 | 29 | } |
| 30 | 30 | |
| 31 | - public function products(){ |
|
| 32 | - return $this->belongsToMany(ProductItem::class,'product_order','order_id','product_item_id')->withPivot('number_products'); |
|
| 31 | + public function products() { |
|
| 32 | + return $this->belongsToMany(ProductItem::class, 'product_order', 'order_id', 'product_item_id')->withPivot('number_products'); |
|
| 33 | 33 | } |
| 34 | 34 | } |