trait HasIcon (View source)

Methods to manage a model's icon attribute.

The icon attribute is stored as type:value, where type is one of the following:

  • emoji, where value is an emoji character (eg. emoji:😊)
  • svg, where value is the name of a Blade Icon (eg. svg:tabler-heart)
  • file, where value is the path to an image file

Traits

Methods to associate uploaded images with a model.

Properties

string $icon
?string $icon_file

The path to the icon file, if the icon is the file type.

Methods

void
saveIcon(array $icon)

Save the icon using input from an component.

Attribute
iconFile()

No description

Details

void saveIcon(array $icon)

Save the icon using input from an component.

Parameters

array $icon

Return Value

void

protected Attribute iconFile()

No description

Return Value

Attribute