소스 검색

新增创建时间修改时间参数

kevinlan@lpchku.com 5 달 전
부모
커밋
9e91d0fd67
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      app/Http/Controllers/API/LibraryController.php

+ 1 - 1
app/Http/Controllers/API/LibraryController.php

@@ -112,7 +112,7 @@ class LibraryController extends Controller
         $libraries = Library::query()
             ->allowed()
             ->where("type", $type)->when($where, fn($query) => $query->where($where))
-            ->get(['id', 'name'])
+            ->get(['id', 'name', 'created_at', 'updated_at'])
             ->each(function ($libraries) {
             // 设置固定的type值
             $libraries->type = 'library';