私はEloquent whereRawとpaginatateの結果を使用するSQL検索を使用しています。Laravel whereステートメントとページ番号
Proplem:結果がページ分割されていると私は、次のページに移動した場合の結果が消えてしまいますし、それだけでlaravelのページネーションbacause「すべてを選択」する唯一の送信ページ= GETリクエストを?。
コード:
laravelだけのページで改ページを生成しますので、私はすべての入力がなくなっている次のページに移動するときif (Input::has('city')) {
$query .= ' and city = '.Input::get('city');
}
if (Input::has('area')) {
$query .= ' and area = '.Input::get('area');
}
if (Input::has('sub_location')) {
$query .= ' and sub_location = '.Input::get('sub_location');
}
if (Input::has('rent')) {
$query .= ' and rent = '.Input::get('rent');
}
if (Input::has('price_min') && Input::has('price_max')) {
$query .= ' and price < '.Input::get('price_max').' and price >'.Input::get('price_min');
}
$listings = ListingDB::whereRaw($query)->paginate(5);
return View::make('page.index')->with('title','Home')->with('listings',$listings);
はそう=変数をGET、私はそれをどのように解決することができますか??
ありがとうございました。