Support the ongoing development of Laravel.io →
Configuration Database Eloquent
Last updated 2 years ago.
0

+1024 ; )

0

Improved:

Paginator::currentPageResolver(function ($pageName) {
    return empty($_GET[$pageName]) ? 1 : $_GET[$pageName];
});

Reference: https://github.com/illuminate/pagination/blob/master/AbstractP...

public static function resolveCurrentPage($pageName = 'page', $default = 1)
{
    if (isset(static::$currentPageResolver)) {
        return call_user_func(static::$currentPageResolver, $pageName);
    }

    return $default;
}
Last updated 8 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

ecstasis ecstasis Joined 5 Feb 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.