show img at menu
This commit is contained in:
parent
9cb82deaf8
commit
a3f97456bc
@ -23,6 +23,9 @@ $table->columns([
|
|||||||
if ($data == 0) return null;
|
if ($data == 0) return null;
|
||||||
return Menu::find($data)->label;
|
return Menu::find($data)->label;
|
||||||
}),
|
}),
|
||||||
|
'icon_file' => function ($data) {
|
||||||
|
return $data ? "<img src='$data' width='150px'>" : "";
|
||||||
|
}
|
||||||
]);
|
]);
|
||||||
$table->beforePrint(function () {
|
$table->beforePrint(function () {
|
||||||
return IconBtnCreateWidget::create(['url' => '/admin/settings/menu/create'])->run();
|
return IconBtnCreateWidget::create(['url' => '/admin/settings/menu/create'])->run();
|
||||||
|
@ -26,7 +26,10 @@ $table->rows([
|
|||||||
'parent_id' => (function ($data) {
|
'parent_id' => (function ($data) {
|
||||||
if ($data == 0) return null;
|
if ($data == 0) return null;
|
||||||
return Menu::find($data)->label;
|
return Menu::find($data)->label;
|
||||||
})
|
}),
|
||||||
|
'icon_file' => function ($data) {
|
||||||
|
return $data ? "<img src='$data' width='300px'>" : "";
|
||||||
|
}
|
||||||
]);
|
]);
|
||||||
$table->create();
|
$table->create();
|
||||||
$table->render();
|
$table->render();
|
Loading…
Reference in New Issue
Block a user