belongsTo(Order::class); } public function product() { return $this->belongsTo(Product::class); } //Formattages public function getFormattedTotalTtcAttribute() { return $this->attributes['formattedTotalTtc'] = sprintf('%s €', number_format($this->attributes['total_ttc'], 2, ',', ' ')); } }