MessageCollection
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.
from
PaginatedCollection
paginator(Collection $items, int $total, int $perPage, int|null $currentPage, string $pageName)
Create a new length-aware paginator instance.
from
PaginatedCollection
MessageInterface|null
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.
protected LengthAwarePaginator
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.
MessageInterface|null
find(int $uid)
Find a message by its UID.
MessageInterface
findOrFail(int $uid)
Find a message by its UID or throw an exception.