kphcdr 1 년 전
부모
커밋
e726c81c22
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      app/Console/Commands/ExportCommand.php

+ 1 - 1
app/Console/Commands/ExportCommand.php

@@ -54,7 +54,7 @@ class ExportCommand extends Command
                     continue;
                 }
                 /** @var Category $category */
-                $category = Category::where("name", $v[1])->value("parent_id");
+                $category = Category::where("name", $v[1])->first();
                 $data = [
                     'name' => $v[0],
                     'parent_id' => optional($category)->id ?? 0,