What is that query supposed to be doing? If assignments is a relationship, then the syntax is:
dd($this->assignments()->where('user_id', auth()->id())->get());
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have this query
// Item.php
dd($this->assignments(function ($assignment) {
return $assignment->where('user_id', auth()->id());
})->get());
I opened it in 2 different browsers, although the result is one item belongs to one user It gives the same results on both users/browsers
as in photo https://ibb.co/kc52jP9
What is that query supposed to be doing? If assignments is a relationship, then the syntax is:
dd($this->assignments()->where('user_id', auth()->id())->get());
Please or to participate in this conversation.