Mar 10, 2016
0
Level 1
Custom data pagination with Laravel 5 using an array from controller
I'm having a function in the controller, it return the results while doing post action..
And it return an array while done post action to the view file
In view
@foreach($results as $res)
<?php
//display contents
echo $res->name;
echo $res->price;
?>
@endforeach
In controller
$this->data['results'] =!empty($aReslts) ? $aReslts : '';
$this->data['img_path'] = \URL::to('').'/';
.
.
return view($page, $this->data);
is used to return all the data's into the view file
In this how should I set pagination in my view file..
Thanks in advance...
Please or to participate in this conversation.