src/PaginateRoute.php
public function getRightPoint(LengthAwarePaginator $paginator)
    {
        $side = $paginator->onEachSide;
        $current = $paginator->currentPage();
        $last = $paginator->lastPage();

        if (! empty($side)) {
            $offset = $current <= $side ? $side - $current + 1 : 0;
            $right = $current + $side + $offset;
        }

        return ! isset($right) || $right > $last ? $last : $right;
    }
public function getRightPoint(LengthAwarePaginator $paginator)
    {
        $side = $paginator->onEachSide;
        $current = $paginator->currentPage();
        $last = $paginator->lastPage();

        if (! empty($side)) {
            $offset = $current <= $side ? $side - $current + 1 : 0;
            $right = $current + $side + $offset;
        }

        return ! isset($right) || $right > $last ? $last : $right;
    }
public function getRightPoint ( LengthAwarePaginator $ paginator ) { $ side = $ paginator -> onEachSide ; $ current = $ paginator -> currentPage ( ) ; $ last = $ paginator -> lastPage ( ) ; if ( ! empty ( $ side ) ) { $ offset = $ current <= $ side ? $ side - $ current + 1 : 0 ; $ right = $ current + $ side + $ offset ; } return ! isset ( $ right ) || $ right > $ last ? $ last : $ right ; }
Get the right or last point of the pagination element.

@param LengthAwarePaginator $paginator
@return int
Get the right or last point of the pagination element .