write miotator for picture

This commit is contained in:
2025-08-13 13:41:34 +03:30
parent 32deecdf8c
commit 81af5bfed8

View File

@@ -101,4 +101,34 @@ class SafetyAndPrivacy extends Model
: Storage::disk('public')->url($value))
);
}
protected function recognize_picture_2(): Attribute
{
return Attribute::make(
get: fn($value) => $value == null ? null :
(filter_var($value, FILTER_VALIDATE_URL)
? $value
: Storage::disk('public')->url($value))
);
}
protected function evidence_picture(): Attribute
{
return Attribute::make(
get: fn($value) => $value == null ? null :
(filter_var($value, FILTER_VALIDATE_URL)
? $value
: Storage::disk('public')->url($value))
);
}
protected function finish_picture(): Attribute
{
return Attribute::make(
get: fn($value) => $value == null ? null :
(filter_var($value, FILTER_VALIDATE_URL)
? $value
: Storage::disk('public')->url($value))
);
}
}