当我使用'like'时,它起作用,但是当我使用'<='时,它不起作用
public function search(Request $request)
{
//
$adultes=$request->get('adultes');
$dispos= Disponible::where('adultes', '<=','%'.$adultes. '%' )
->paginate(5);
return view('rooms_dispo',['dispos'=>$dispos]);
}
答案 0 :(得分:1)
public function search(Request $request)
{
$adultes = $request->get('adultes');
$dispos = Disponible::where('adultes', '<=', $adultes)->paginate(5);
return view('rooms_dispo', ['dispos' => $dispos]);
}