You shouldn't return data based on a POST request, so why are you trying to use it this way (with POST) ?
Mar 4, 2022
7
Level 1
Date And Multiple Field Filter Through SPATIE query builder for post request
I go through 'SPATIE query builder' documentation and find they cannot describe properly how to post methods implemented. I need to filter data based on multiple parameters including the data add date filter, and I am using the POST method, How I can achieve this for 'SPATIE query builder'.
I can Filter 1 field by writing below code
$data = QueryBuilder::for(EmpData::where('empAddedByAgent', $request->searchAgent))
->get();
The form Look Like Below Image https://www.awesomescreenshot.com/image/23496415?key=06f5bda4269400354afa2d1690557544
Level 122
@DevWebTK its not good practice. You should always return a redirect at the end of a post request.
Why do you not set your form to action="GET" ?
Please or to participate in this conversation.