loadDefinition(TicketUserDefinition::class); } public function filterByTicket(Ticket $ticket): self { $this->andWhere(['ticket_user.id_ticket' => $ticket->id]); return $this; } public function filterByUser(User $user): self { $this->andWhere(['ticket_user.id_user' => $user->id]); return $this; } }