'array']; public function conversations(): HasMany { return $this->hasMany(ChatConversation::class, 'contact_id'); } public function activeConversation(): ?ChatConversation { return $this->conversations() ->whereIn('estado', ['bot', 'agente']) ->latest() ->first(); } }