Answer the question
In order to leave comments, you need to log in
How to split cells in laravel?
Here is part of the request
$places = Place::where('price', '<=', $price_filter)->where('people', '>=', $people_filter)->whereHas('metros', function ($query) use ($metros) {
$query->whereIn('metro_id', $metros);
})->whereHas('comforts', function ($query) use ($comforts) {
$query->whereIn('comfort_id', $comforts);
})->orderBy('price', 'desc')->skip($offset)->take($take)->get();
where('price', '<=', $price_filter)
Answer the question
In order to leave comments, you need to log in
get the value (compare with $price_filter) divided by the value in the people cell
not sure what to share? variable or price in the database divided by people?where(DB::raw('(price/people)'), '<=', $price_filter)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question