'datetime:d/m/Y H:i', 'updated_at' => 'datetime:d/m/Y H:i', ]; public function getStatusColorAttribute() { return [ 'active' => 'bg-green-100 text-green-800', 'closed' => 'bg-red-100 text-red-800', ][$this->status] ?? 'bg-gray-100 text-gray-800'; } public function getStatusTextAttribute() { return [ 'active' => 'Activo', 'closed' => 'Cerrado', ][$this->status] ?? 'Desconocido'; } public function contacts(): BelongsToMany { return $this->belongsToMany(User::class, 'company_contacts') ->withPivot('position') ->withTimestamps(); } public function users() { return $this->hasMany(User::class); } public function projects() { return $this->hasMany(Project::class); } }