HasModificationMedia
trait HasModificationMedia (View source)
Optional: apply to a Modification subclass (which must also implement
Spatie\MediaLibrary\HasMedia and use InteractsWithMedia) to allow
attaching images to a pending change. Requires spatie/laravel-medialibrary,
which this package does not depend on directly.
Methods
void
registerMediaConversions(Media|null $media = null)
Register the thumb (300x200) and normal (800x600) image conversions.
Media
addImage(UploadedFile $image, array $meta)
Attach an image to the main media collection.
static array|null
imageLoad(Media|null $media, array $loads = ['thumb', 'normal', 'original'])
The name, the label and the URL of each requested size of an image.
Details
void
registerMediaConversions(Media|null $media = null)
Register the thumb (300x200) and normal (800x600) image conversions.
Media
addImage(UploadedFile $image, array $meta)
Attach an image to the main media collection.
static array|null
imageLoad(Media|null $media, array $loads = ['thumb', 'normal', 'original'])
The name, the label and the URL of each requested size of an image.