BookStack\Providers\PaginationServiceProvider::register PHP Method

register() public method

Register the service provider.
public register ( ) : void
return void
    public function register()
    {
        Paginator::viewFactoryResolver(function () {
            return $this->app['view'];
        });
        Paginator::currentPathResolver(function () {
            return baseUrl($this->app['request']->path());
        });
        Paginator::currentPageResolver(function ($pageName = 'page') {
            $page = $this->app['request']->input($pageName);
            if (filter_var($page, FILTER_VALIDATE_INT) !== false && (int) $page >= 1) {
                return $page;
            }
            return 1;
        });
    }
PaginationServiceProvider