when i use form i have that url http://ift.tt/2y0ZWsv for the handing this url i used that code
public static function search($paginate, $condotions = null, $order = null){
return AppartmentRentDay::where(function ($query) use ($condotions){
foreach ($condotions as $key => $value){
if($value){
$parametrs = [];
if(substr($key,-3) == "_up"){
$parametrs[0] = substr($key,0,-3);
$parametrs[1] = '>=';
}elseif (substr($key,-3) == "_to"){
$parametrs[1] = '<=';
$parametrs[0] = substr($key,0,-3);
}else{
$parametrs[0] = $key;
$parametrs[1] = '=';
}
$query->where($parametrs[0], $parametrs[1], $value);
}
}
})->paginate($paginate);
}
pagginate works right, but what gives for that hrefs
<ul class="pagination">
<li class="disabled"><span>«</span></li>
<li class="active"><span>1</span></li>
<li><a href="http://ift.tt/2knnWkg">2</a></li>
<li><a href="http://ift.tt/2knnWkg" rel="next">»</a></li>
</ul>
and thats work incorrect, how to add my get parametrs for this href? Plz give me some info Ty Laravel 5.5
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire