debug road observed

This commit is contained in:
2025-04-20 11:21:03 +03:30
parent 79e6cc37aa
commit 1cb4c4f15d
3 changed files with 50 additions and 66 deletions

View File

@@ -108,14 +108,20 @@ class RoadObserved extends Model
protected function imageAfter(): Attribute
{
return Attribute::make(
get: fn($value) => $value == null ? null : Storage::disk('public')->url($value)
get: fn($value) => $value == null ? null :
(filter_var($value, FILTER_VALIDATE_URL)
? $value
: Storage::disk('public')->url($value))
);
}
protected function imageBefore(): Attribute
{
return Attribute::make(
get: fn($value) => $value == null ? null : Storage::disk('public')->url($value)
get: fn($value) => $value == null ? null :
(filter_var($value, FILTER_VALIDATE_URL)
? $value
: Storage::disk('public')->url($value))
);
}
}