瀏覽代碼

Update SearchData.php

admin@web.or.kr 4 月之前
父節點
當前提交
5abc047c05
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      app/Models/DTO/SearchData.php

+ 3 - 3
app/Models/DTO/SearchData.php

@@ -11,8 +11,8 @@ class SearchData implements Responsable
     private array $extra = [];
 
     public function __construct(
-        public int $page,
-        public int $perPage,
+        public int $page = 1,
+        public int $perPage = DEFAULT_LIST_PER_PAGE,
         public int $pageCount,
         public int $offset = 0,
         public ?int $sort = null,
@@ -57,7 +57,7 @@ class SearchData implements Responsable
 
     public function __set(string $name, mixed $value): void
     {
-        // readonly core 필드 오염 방지
+        // readonly core 占십듸옙 占쏙옙占쏙옙 占쏙옙占쏙옙
         if (property_exists($this, $name)) {
             throw new \LogicException("Cannot set '{$name}' on SearchData (readonly property).");
         }