Spatie\PaginateRoute\PaginateRoute::currentPage PHP Метод

currentPage() публичный Метод

Return the current page.
public currentPage ( ) : integer
Результат integer
    public function currentPage()
    {
        $currentRoute = $this->router->getCurrentRoute();
        if (!$currentRoute) {
            return 1;
        }
        $query = $currentRoute->parameter('pageQuery');
        return (int) str_replace($this->pageKeyword . '/', '', $query) ?: 1;
    }