Поиск, работа над query в js

This commit is contained in:
brusnitsyn
2025-12-01 17:38:11 +09:00
parent c9a392f84f
commit 063ddafdfb
8 changed files with 160 additions and 6 deletions

View File

@@ -11,9 +11,15 @@ class IndexController extends Controller
{
public function index(Request $request)
{
$pageSize = $request->get('pageSize', 15);
$pageSize = $request->get('page_size', 15);
$searchText = $request->get('search', null);
$cards = SttMedicalHistory::query();
if (!empty($searchText)) {
$cards = $cards->search($searchText);
}
$cards = SttMedicalHistoryResource::collection($cards->paginate($pageSize));
return Inertia::render('Home/Index', [