'ID', 'id_ticket' => 'Ticket', 'id_user' => 'Utilisateur', 'read_at' => 'Date de lecture', ]; } /* * Relations */ public function getUser() { return $this->hasOne(User::class, ['id' => 'id_user']); } public function getTicket() { return $this->hasOne(Ticket::class, ['id' => 'id_ticket']); } public function populateUser(User $user): void { $this->populateFieldObject('id_user', 'user', $user); } public function populateTicket(Ticket $ticket): void { $this->populateFieldObject('id_ticket', 'ticket', $ticket); } }