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