Hi I have 2 Dropdown one fro Maximun Price and another one for Minimum Price, I am trying to filter data from Database Suppose I have 4 records with price(20000, 40000, 60000, 80000), When user clicks on 60000 i want to show the less than and equal data so result will come like this(20000, 40000, 60000). here is my controller
public function max_price()
{
$term=60000;
$display = DB::table('property_details')
->where('property_price', '>', '$term')
->Where('sale_or_rent', '=', 'sale')
->get();
var_dump($display);
if(count($display)!=0)
{
$returnHTML = view('/pages/right_side_area')->with('row', $display)->render();
return response()->json(array('success' => true, 'html'=>$returnHTML));
}
else
{
session::flash('status', 'No Records Found!!!');
$returnHTML = view('/pages/right_side_area')->with('row', $display)->render();
return response()->json(array('success' => true, 'html'=>$returnHTML));
}
}
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/24Fcsq6
via IFTTT
Aucun commentaire:
Enregistrer un commentaire