disto

select columns from eager loaded tables

Posted 1 year ago by disto

Hi, I have the following query which works well but I only need some columns (article_id, price) from the last (articles) loaded table. How do I do this? This is the query:

$result = OrderRelation::where('relation_id', $relation_id)->with('order.order_lines.articles)->get()

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.