Well ... I'm sorry but except the post of sykano I don't see anything related to this ... maybe I'm dump (but I don:'t think ^^) I'm on l4.
If Laravel 4 something like this works 100% for me:
public function ownerlist()
{
if(isset($_REQUEST['t1']))
{
$t1 = $_REQUEST['t1'];
}
else
{
$t1 = "";
}
$ownersearch = $t1;
$ownersearch = $ownersearch . "%";
$data['owners'] = DB::table('powners')
->where('oname', 'like', $ownersearch)
->orderBy('oname', 'asc')
->Paginate(5);
$data['osearch'] = $t1;
return View::make('owner/pownerlist')->with('data', $data['owners'])->with('data2', $data['osearch']);
}
view:
<div class="pagination" style="margin-left: 20px; margin-right: auto; width: 800px; border:solid red; display: block;">
<?php echo $data->appends(array('t1' => $data2))->links(); ?>
</div>
If L5 read this:
http://laravel.io/forum/11-13-2014-laravel-5-pagination
Works 100% perfect.
Hi, Great thanks ! Indeed i had 2 pagination on the same page and the ?page=2 was affecting the second one !
Thanks !
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community