feat(attachment): refactor image cropping functionality to use range objects and update related tests

This commit is contained in:
2026-08-18 12:54:47 -03:00
parent 58cc35fd61
commit 9cfd49f233
16 changed files with 496 additions and 54 deletions

View File

@@ -19,8 +19,8 @@ use Illuminate\Support\Str;
'mime_type',
'extension',
'size',
'crop_horizontal_start_percent',
'crop_vertical_start_percent',
'crop_horizontal',
'crop_vertical',
'cropped_attachment_id',
])]
class Attachment extends Model
@@ -43,8 +43,8 @@ class Attachment extends Model
return [
'type' => AttachmentType::class,
'size' => 'integer',
'crop_horizontal_start_percent' => 'float',
'crop_vertical_start_percent' => 'float',
'crop_horizontal' => 'array',
'crop_vertical' => 'array',
'cropped_attachment_id' => 'integer',
];
}