belongsTo('App\Auction'); } public function business_item_variation() { return $this->belongsTo('App\BusinessItemVariation'); } public function order() { return $this->belongsTo('App\Order'); } public function getCreatedAtAttribute($date) { return \Morilog\Jalali\jDate::forge($date)->format('datetime'); } public function setDetailsAttribute($value) { $this->attributes['details'] = json_encode($value, JSON_UNESCAPED_UNICODE); } public function getDetailsAttribute() { return json_decode($this->attributes['details']); } public function getAllPriceAttribute() { return $this->attributes['price'] * $this->attributes['quantity']; } public function payable() { return $this->morphTo(); } }