Support the ongoing development of Laravel.io →
Views Blade Packages
Last updated 1 year ago.
0

I'm still finding my feet with L4 - so may not be the best person to help!

From that github repo page:

New Laravel UrlGenerator dropped support for extra parameters - it means that routes without {page} parameter won't work with pagination

so I think you need to amend your routes and add the {page} placeholder, something like this maybe

Route::get('blog/{page}', function()
{
    $posts = Post::orderBy('id', 'DESC')
        ->paginate(20)
        ->useCurrentRoute()
        ->pagesProximity(3);

    return View::make('blog')->with('posts', $posts);
});
Last updated 1 year ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Silver89 silver89 Joined 7 May 2014

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.