input('sort_order'))) { $this->merge(['sort_order' => strtolower($this->input('sort_order'))]); } } /** * 검증 규칙을 반환합니다. * * @return array> 검증 규칙 */ public function rules(): array { return [ 'page' => ['nullable', 'integer', 'min:1'], // 게시판은 운영자 등록 설정성 테이블 — 전체 목록 셀렉트 소비처 // (게시판 설정 999 / 쇼핑몰 환경설정 문의 카드 200)가 이 상한에 묶인다. // 100 으로 조이면 두 화면 진입이 422 로 깨진다 (BoardIndexSortTest 회귀 고정). 'per_page' => ['nullable', 'integer', 'min:1', 'max:999'], 'type' => ['nullable', 'string', 'max:50'], 'search' => ['nullable', 'string', 'max:100'], 'sort_by' => ['nullable', 'string', 'in:id,slug,type,is_active,posts_count,comments_count,created_at,updated_at'], 'sort_order' => ['nullable', 'string', 'in:asc,desc'], ]; } }