moshaorui 3 weeks ago
parent
commit
3c871ed402
1 changed files with 1 additions and 4 deletions
  1. 1 4
      app/Distributor/Controllers/DistProductCategoryController.php

+ 1 - 4
app/Distributor/Controllers/DistProductCategoryController.php

@@ -77,10 +77,7 @@ class DistProductCategoryController extends AdminDistController
     {
         return Form::make(new DistProductCategory(), function (Form $form) {
             $form->select('parent_id', admin_trans_field('parent'))
-                ->options(DistProductCategory::selectMainOptions(function ($query) {
-                    // 在这里定义查询条件
-                    $query->where('parent_id', 0);
-                }))
+                ->options(DistProductCategory::selectMainOptions())
                 ->saving(function ($v) {
                     return (int) $v;
                 });