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