Поиск, работа над query в js
This commit is contained in:
@@ -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', [
|
||||
|
||||
Reference in New Issue
Block a user