class MessageCollection extends PaginatedCollection (View source)

Properties

protected int $total

The total number of items.

from  PaginatedCollection

Methods

paginate(int $perPage = 15, int|null $page = null, string $pageName = 'page', bool $prepaginated = false)

Paginate the current collection.

paginator(Collection $items, int $total, int $perPage, int|null $currentPage, string $pageName)

Create a new length-aware paginator instance.

int|null
total(int|null $total = null)

Get or set the total amount.

find(int $uid)

Find a message by its UID.

findOrFail(int $uid)

Find a message by its UID or throw an exception.

Details

LengthAwarePaginator paginate(int $perPage = 15, int|null $page = null, string $pageName = 'page', bool $prepaginated = false)

Paginate the current collection.

Parameters

int $perPage
int|null $page
string $pageName
bool $prepaginated

Return Value

LengthAwarePaginator

protected LengthAwarePaginator paginator(Collection $items, int $total, int $perPage, int|null $currentPage, string $pageName)

Create a new length-aware paginator instance.

Parameters

Collection $items
int $total
int $perPage
int|null $currentPage
string $pageName

Return Value

LengthAwarePaginator

int|null total(int|null $total = null)

Get or set the total amount.

Parameters

int|null $total

Return Value

int|null

MessageInterface|null find(int $uid)

Find a message by its UID.

Parameters

int $uid

Return Value

MessageInterface|null

MessageInterface findOrFail(int $uid)

Find a message by its UID or throw an exception.

Parameters

int $uid

Return Value

MessageInterface