Belongs To Through Relations in Laravel 9
Take the following 3 models:
customer
id - integer
name - string
invoices
id - integer
status - string
customer_id - integer
credit_notes
id - integer
status - string
invoice_id - integer
Laravel gives us an easy wa...
annissimo.com2 min read
Cyril Fehintoluwa
Thanks for the great article, needed this about a month ago or so.
But here
'invoice_id', // refers to invoice_id column on customers tableI think you meant on the credit_notes table, right?