(编辑:jimmy 日期: 2024/10/5 浏览:2)
修改模型Category.php
<"htmlcode"><"<img src='$src' style='max-width:30px;max-height:30px' class='img'/>"; return "{$branch['id']} - {$branch['name']} $logo"; }); })); }); } //下面是自己的代码 //....... }添加路由app/Admin/routes.php
$router->resource('categories',CategoryController::class);select中使用分类树
$form->select('parent_id', __('Parent id'))->options(Category::selectOptions())->default(1);总结