Level 102
How do you want it in there? Do you mean you wish to load the relationship? Or restrict the results by the relationship?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi,
In my payments model I have created a relationship belongsTo for my donate_messages table on payment.id
I would now like to bring through 'MESSAGE' into the Payment query below
Thanks
$query = Payment::whereIn('type', ['subscription', 'purchase'])->where('campaign_id', '=', $campaign_id)->active();
Please or to participate in this conversation.