class Pagination (View source)

Methods

__construct(int $next, int $previous, int $total, int $perPage, int $current, Collection $data)

Pagination constructor.

int
next()

Get the next page number.

bool
hasNext()

Check if there is a next page.

int
perPage()

Get the number of items per page.

int
previous()

Get the previous page number.

bool
hasPrevious()

Check if there is a previous page.

int
current()

Get the current page number.

Collection
items()

Get the collection of items for the current page.

int
total()

Get the total number of items.

Details

__construct(int $next, int $previous, int $total, int $perPage, int $current, Collection $data)

Pagination constructor.

Parameters

int $next

The next page number.

int $previous

The previous page number.

int $total

The total number of items.

int $perPage

The number of items per page.

int $current

The current page number.

Collection $data

The collection of items for the current page.

int next()

Get the next page number.

Return Value

int

bool hasNext()

Check if there is a next page.

Return Value

bool

int perPage()

Get the number of items per page.

Return Value

int

int previous()

Get the previous page number.

Return Value

int

bool hasPrevious()

Check if there is a previous page.

Return Value

bool

int current()

Get the current page number.

Return Value

int

Collection items()

Get the collection of items for the current page.

Return Value

Collection

int total()

Get the total number of items.

Return Value

int