feat(attachment): refactor image cropping functionality to use range objects and update related tests
This commit is contained in:
@@ -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',
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user