create accessor
This commit is contained in:
@@ -69,4 +69,25 @@ class Harim extends Model
|
||||
->latestOfMany()
|
||||
->value('expert_description');
|
||||
}
|
||||
|
||||
protected function forbiddenArea(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
get: fn($value) => json_decode($value)
|
||||
);
|
||||
}
|
||||
|
||||
protected function finalArea(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
get: fn($value) => json_decode($value)
|
||||
);
|
||||
}
|
||||
|
||||
protected function finalPlan(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
get: fn($value) => json_decode($value)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user