Without any of your code's details, I'm afraid we can't help you.
You can use code blocks to further specify your code. In particular: the form you're submitting, your routes/web file and the controller accepting the request.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I don't know why but my $request->has('category') has value true, although it is empty!!!!
here is my JobController
$jobs = Job::orderBy('id', 'DESC');
if($request->has('category')){
$jobs->where('category', 'like', "%$request->category%");
}
if($request->has('cost2')){
$jobs->whereBetween('cost',[$request->cost1,$request->cost2]);
}
else if($request->has('cost1')){
$jobs->where('cost', '>=', $request->cost1);
}
if($request->has('region')){
$jobs->where('region', 'like', "%$request->region%");
}
if($request->has('deadline2')){
$jobs->whereBetween('deadline',[$request->deadline1,$request->deadline2]);
}
else if($request->has('deadline1')){
$jobs->where('deadline', '>', $request->deadline1);
}
$jobs = $jobs->get();
return view('filter', compact('jobs'));
Please help))
Please or to participate in this conversation.