validate([ 'q' => ['nullable', 'string', 'max:200'], ]); $q = trim((string)($data['q'] ?? '')); $notices = $this->service->paginate($q, 15); return view('web.cs.notice.index', [ 'notices' => $notices, 'q' => $q, ]); } public function show(Request $request, int $seq) { $res = $this->service->detail($seq, $request->session()); return view('web.cs.notice.show', $res); } public function download(int $seq, int $slot): StreamedResponse { $r = $this->service->download($seq, $slot); abort_unless($r['ok'], 404); return Storage::disk('public')->download($r['path'], $r['name']); } }