Support the ongoing development of Laravel.io →
Requests Database Eloquent
Last updated 1 year ago.
0

See other recent pagination answer, it speaks all.

0

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.

0

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.

Last updated 9 years ago.
0

Hi, Great thanks ! Indeed i had 2 pagination on the same page and the ?page=2 was affecting the second one !

Thanks !

Last updated 9 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

vlafranca vlafranca Joined 13 Jan 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.