'array', // JSON to Array ]; public function customer() { return $this->belongsTo(Customer::class); } public function items() { return $this->hasMany(LineItem::class); } /** * Get the payment term for the invoice. */ public function getPaymentTermsAttribute() { return $this->customer->paymentTerms; } }