title: Laravel pagination page 2 loses the data
body: <p>When i fill my search and post it, it gets the data and returns it.
  In this query i use ->paginate(50);</p>
  
  <pre><code>$products = Product7Days::where('omschrijving', 'LIKE', '%'.$request-&gt;omschrijving.'%')
                                      -&gt;where('artikelnummer', 'LIKE', '%'.$request-&gt;artikelnummer.'%')
                                      -&gt;whereIn('relatienummer', $leverancierenArray)
                                      -&gt;whereIn('omzetgroep', $omzetgroepenArray)
                                      -&gt;whereIn('btwcode', $BTWArray)
                                      -&gt;whereBetween('prijs', [$prijsVan, $prijsTot])
                                      -&gt;where('totaalaantal', '&gt;=', $aantalVan)
                                      -&gt;where('totaalaantal', '&lt;=', $aantalTot)
                                      -&gt;paginate(50);
  </code></pre>
  
  <p>My routes</p>
  
  <pre><code>Route::get('/artikelen', 'ProductController@index')-&gt;name('artikelen');
  
  Route::post('/artikelen', 'ProductController@search')-&gt;name('artikelen.search');
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/UZ2aA.png" rel="nofollow noreferrer">The pagination on the page.</a></p>
  
  <p>So that all works, but when i go to the second page, for some reason no result is there</p>
  
  <p>when i search, it goes to this page
  <a href="http://172.16.0.51:8000/artikelen" rel="nofollow noreferrer">http://172.16.0.51:8000/artikelen</a></p>
  
  <p>and when i click on page 2 the link is
  <a href="http://172.16.0.51:8000/artikelen?page=2" rel="nofollow noreferrer">http://172.16.0.51:8000/artikelen?page=2</a>
  But no data</p>
  
  <p>Blade file</p>
  
  <pre><code>@if (isset($products))
                      &lt;table class="table table-striped table-responsive-xl"&gt;
                          &lt;thead class="thead-dark"&gt;
                              &lt;tr&gt;
                                  &lt;th&gt;Artikelnummer&lt;/th&gt;
                                  &lt;th&gt;Omschrijving&lt;/th&gt;
                                  &lt;th&gt;Prijs&lt;/th&gt;
                                  &lt;th&gt;Totaal &lt;br&gt; verkocht&lt;/th&gt;
                                  &lt;th&gt;Totaal &lt;br&gt; omzet&lt;/th&gt;
                                  @foreach ($filialen as $filiaal)
                                  @if ($filiaal !== 6)
                                  &lt;th&gt;aantal. &lt;br&gt;F{{$filiaal}}&lt;/th&gt;
                                  &lt;th&gt;voorr. &lt;br&gt;F{{$filiaal}}&lt;/th&gt;
                                  @else
                                  &lt;th&gt;voorr. &lt;br&gt;F{{$filiaal}}&lt;/th&gt;
                                  @endif
                                  @endforeach
                              &lt;/tr&gt;
                          &lt;/thead&gt;
                          &lt;tbody&gt;
                          @foreach ($products as $product)
                              &lt;tr&gt;
                                  &lt;th&gt;{{ $product-&gt;artikelnummer}}&lt;/th&gt;
                                  &lt;th&gt;{{ $product-&gt;omschrijving}}&lt;/th&gt;
                                  &lt;th&gt;{{ $product-&gt;prijs}}&lt;/th&gt;
                                  &lt;th&gt;{{ $product-&gt;totaalaantal}}&lt;/th&gt;
                                  &lt;th class="text-right"&gt;{{ round($product-&gt;totaalaantal * $product-&gt;prijs, 1) }}&lt;/th&gt;
                                  @foreach ($filialen as $filiaal)
                                  @if ($filiaal !== 6)
                                  &lt;th class="text-right"&gt;{{ $product["aantalF".$filiaal] }}&lt;/th&gt;
                                  &lt;th class="text-right"&gt;{{ $product["voorraadF".$filiaal] }}&lt;/th&gt;
                                  @else
                                  &lt;th&gt;{{ $product-&gt;voorraadF6 }}&lt;/th&gt;
                                  @endif
                                  @endforeach
                              &lt;/tr&gt;
                          @endforeach
                          &lt;/tbody&gt;
                      &lt;/table&gt;
                      {{ $products-&gt;links() }}
                      @endif
  </code></pre>
  
  <p>The isset() returns false...</p>
  
  <p>I am pretty sure when i click page 2 the data is getting lost but then would my question be how to i give that data through</p>