jeudi 10 mars 2016

How to set pagination in laravel 5 while passing an array from the controller

Here is my code

Controller

$query = "SELECT `h`.*,".$countquery.",".$minquery." FROM `abserve_hotels` as `h`";
$aReslts = $this->model->getData($query,$sqlCond);

$this->data['Rooms'] =!empty($aReslts) ? $aReslts : '';

return view('hotel.list', $this->data);

Here,$sqlCond returns several result set while passing Ajax and for post action

View

<?php
if(($Rooms)){
?>
@foreach($Rooms as $room)
{{ $room->id }}
@endforeach

<?php
}
?>

I tried several ways to set the pagination methods..But it din't work for me..

How should I make pagination for this..Could someone help me!!..

Thanks in advance



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire