When I use form I have that URL
view-source:http://teory.loc/realty/appartment_rent/day?city=&district=&cost_up=29999&cost_to=333333&rooms_up=&rooms_to=&area_up=&area_to=&floor_up=&floor_to=
for example
To handle 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);
}
Paginate works right, but {{ $info->links() }} 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://teory.loc/realty/appartment_rent/day?page=2">2</a></li>
<li><a href="http://teory.loc/realty/appartment_rent/day?page=2" rel="next">»</a></li>
</ul>
And that works incorrect, how to add my get parameters for this href?
Plz give me some info Ty Laravel 5.5