mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-app.git
synced 2026-01-27 12:43:17 +00:00
🔥 Remove redundant PRD.md file, update media models with stricter MIME type validation, and refine media conversion settings.
This commit is contained in:
@@ -45,21 +45,22 @@ class OrangePill extends Model implements HasMedia
|
||||
});
|
||||
}
|
||||
|
||||
public function registerMediaConversions(Media $media = null): void
|
||||
public function registerMediaConversions(?Media $media = null): void
|
||||
{
|
||||
$this
|
||||
->addMediaConversion('preview')
|
||||
->fit(Manipulations::FIT_CROP, 300, 300)
|
||||
->nonQueued();
|
||||
$this->addMediaConversion('thumb')
|
||||
->fit(Manipulations::FIT_CROP, 130, 130)
|
||||
->width(130)
|
||||
->height(130);
|
||||
->fit(Manipulations::FIT_CROP, 130, 130)
|
||||
->width(130)
|
||||
->height(130);
|
||||
}
|
||||
|
||||
public function registerMediaCollections(): void
|
||||
{
|
||||
$this->addMediaCollection('images');
|
||||
$this->addMediaCollection('images')
|
||||
->acceptsMimeTypes(['image/jpeg', 'image/png', 'image/gif', 'image/webp']);
|
||||
}
|
||||
|
||||
public function user(): BelongsTo
|
||||
|
||||
Reference in New Issue
Block a user