Jul 20, 2017
0
Level 15
Job Post Filter
I am working on job portal and I have few search filter one is Minimum pay and max pay. Each job posts has min pay and max pay. When user wants to filter they type in min and max pay and filter the result. But Client says
"if you want a job between $5-7, you'd want to know if there's one offering between $6&9 and another offering between $4& 6"
He wants the results to show range that user is looking for.
I am not clear on what logic I should use to achieve that. Here is what I am using at this moment.
if( isset($request->min_pay) ) {
$builder->where('min_pay', '>=', $request->min_pay);
}
if( isset($request->max_pay) ) {
$builder->where('max_pay', '<=', $request->max_pay);
}
Please help. Thank you.
Please or to participate in this conversation.