2020
10-07
10-07
laravel admin实现分类树/模型树的示例代码
修改模型Category.php<?phpnamespaceApp\Admin\Models;useEncore\Admin\Traits\AdminBuilder;useEncore\Admin\Traits\ModelTree;useIlluminate\Database\Eloquent\Model;classCategoryextendsModel{useModelTree,AdminBuilder;protected$table='category';publicfunction__construct(array$attributes=[]){parent::__construct($attributes);//这里根据自己的字段修改$this->setParentColumn('pare...
继续阅读 >