fix model

This commit is contained in:
2025-08-13 13:52:18 +03:30
parent 2eb9c79f22
commit 3c49b1f6db

View File

@@ -95,40 +95,28 @@ class SafetyAndPrivacy extends Model
protected function actionPicture(): Attribute protected function actionPicture(): Attribute
{ {
return Attribute::make( return Attribute::make(
get: fn($value) => $value == null ? null : get: fn($value) => $value == null ? null : Storage::disk('public')->url($value)
(filter_var($value, FILTER_VALIDATE_URL)
? $value
: Storage::disk('public')->url($value))
); );
} }
protected function recognizePicture2(): Attribute protected function recognizePicture2(): Attribute
{ {
return Attribute::make( return Attribute::make(
get: fn($value) => $value == null ? null : get: fn($value) => $value == null ? null : Storage::disk('public')->url($value)
(filter_var($value, FILTER_VALIDATE_URL)
? $value
: Storage::disk('public')->url($value))
); );
} }
protected function evidencePicture(): Attribute protected function evidencePicture(): Attribute
{ {
return Attribute::make( return Attribute::make(
get: fn($value) => $value == null ? null : get: fn($value) => $value == null ? null : Storage::disk('public')->url($value)
(filter_var($value, FILTER_VALIDATE_URL)
? $value
: Storage::disk('public')->url($value))
); );
} }
protected function finishPicture(): Attribute protected function finishPicture(): Attribute
{ {
return Attribute::make( return Attribute::make(
get: fn($value) => $value == null ? null : get: fn($value) => $value == null ? null : Storage::disk('public')->url($value)
(filter_var($value, FILTER_VALIDATE_URL)
? $value
: Storage::disk('public')->url($value))
); );
} }
} }