trait HasIconImage

For a model whose Font Awesome icon can be replaced by an uploaded image. The model's table needs a nullable `icon_image_path` string and an unsigned tiny integer `icon_image_scales` defaulting to 1.

The image's files are deleted with the model. A query that deletes rows directly bypasses model events, so it leaves their files behind: delete such models one by one, or delete their files with the uploader.

Properties

string|null $icon_image_path
int $icon_image_scales
string|null $icon_image_url
string|null $icon_image_srcset

Methods

static void
bootHasIconImage()

No description

void
initializeHasIconImage()

No description

iconImageUploader()

The uploader that stores this model's image. Override it to return a subclass with another box size, scales or disk.

string|null
getIconImageUrlAttribute()

No description

string|null
getIconImageSrcsetAttribute()

No description

Details

static void bootHasIconImage()

Return Value

void

void initializeHasIconImage()

Return Value

void

IconImageUploader iconImageUploader()

The uploader that stores this model's image. Override it to return a subclass with another box size, scales or disk.

Return Value

IconImageUploader

string|null getIconImageUrlAttribute()

Return Value

string|null

string|null getIconImageSrcsetAttribute()

Return Value

string|null