From 81af5bfed8b1dd88b6a547a425874f67703ce4ba Mon Sep 17 00:00:00 2001 From: joddyabott Date: Wed, 13 Aug 2025 13:41:34 +0330 Subject: [PATCH] write miotator for picture --- app/Models/SafetyAndPrivacy.php | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/app/Models/SafetyAndPrivacy.php b/app/Models/SafetyAndPrivacy.php index c75eaefc..0ce874f5 100644 --- a/app/Models/SafetyAndPrivacy.php +++ b/app/Models/SafetyAndPrivacy.php @@ -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)) + ); + } }