Цю сторінку ще не перекладено українською, тому нижче англійська версія.

icon() table()

Show an icon from an icon class name (icon-*) or an image file of uploads/icons/.

table()->icon($name, $extra = [])

Опції

ОпціяЗначення
(common options)The common column options.

Приклад

Icon Назва
Home
Settings
No icon

Код

$rows = [
    1 => ['id' => 1, 'name' => 'Home', 'icon' => 'icon-home'],
    2 => ['id' => 2, 'name' => 'Settings', 'icon' => 'icon-cog'],
    3 => ['id' => 3, 'name' => 'No icon', 'icon' => ''],
];
return table($rows, ['no_pages' => 1])
    ->icon('icon')
    ->text('name');

Примітки

  • A value that is not an icon-* class is looked up as a file in uploads/icons/ of the project; a missing file prints nothing.
  • It also calls form().

Див. також: form/icon_select_box, html/icon