'Active', 10 => 'In-Active', ]; protected function statusName(): Attribute { return Attribute::make( get: function (mixed $value, array $attributes) { switch ($attributes['status']) { case '10': return '' . self::STATUS[$attributes['status']] . ''; case '11': return '' . self::STATUS[$attributes['status']] . ''; default: # code... break; } }, set: fn($value) => $value, ); } }