Collection
extends Resource
in package
Table of Contents
- $items : array<string|int, mixed>|array<string|int, Item>
- __construct() : mixed
- Collection constructor.
- cache() : Collection
- collect() : Collection
- latest() : Collection
Properties
$items
protected
array<string|int, mixed>|array<string|int, Item>
$items
= []
Methods
__construct()
Collection constructor.
public
__construct(array<string|int, mixed> $data) : mixed
Parameters
- $data : array<string|int, mixed>
Return values
mixed —cache()
public
cache() : Collection
Return values
Collection —collect()
public
collect() : Collection
Return values
Collection —latest()
public
latest([string $by = 'created_at' ][, int|null $amount = null ]) : Collection
Parameters
- $by : string = 'created_at'
- $amount : int|null = null