title: How to set pagination in laravel 5 while passing an array from the controller
body: <p>Here is my code </p>
  
  <p><strong>Controller</strong></p>
  
  <pre><code>$query = "SELECT `h`.*,".$countquery.",".$minquery." FROM `abserve_hotels` as `h`";
  $aReslts = $this-&gt;model-&gt;getData($query,$sqlCond);
  
  $this-&gt;data['Rooms'] =!empty($aReslts) ? $aReslts : '';
  
  return view('hotel.list', $this-&gt;data);
  </code></pre>
  
  <p>Here,<code>$sqlCond</code> returns several result set while passing Ajax and for post action</p>
  
  <p><strong>View</strong></p>
  
  <pre><code>&lt;?php
  if(($Rooms)){
  ?&gt;
  @foreach($Rooms as $room)
  {{ $room-&gt;id }}
  @endforeach
  
  &lt;?php
  }
  ?&gt;
  </code></pre>
  
  <p>I tried several ways to set the pagination methods..But it din't work for me..</p>
  
  <p>How should I make pagination for this..Could someone help me!!..</p>
  
  <p>Thanks in advance</p>