Collection::put()

$this put(mixed $key, mixed $value) Put an item in the collection by key. Parameters mixed $key mixed $value Return Value $this

Collection::push()

$this push(mixed $value) Push an item onto the end of the collection. Parameters mixed $value Return Value $this

Collection::random()

mixed random(int $amount = 1) Get one or more items randomly from the collection. Parameters int $amount Return Value mixed Exceptions InvalidArgumentException

Collection::push()

$this push(mixed $value) Push an item onto the end of the collection. Parameters mixed $value Return Value $this

Collection::pull()

mixed pull(mixed $key, mixed $default = null) Get and remove an item from the collection. Parameters mixed $key mixed $default Return Value mixed

Collection::prepend()

$this prepend(mixed $value, mixed $key = null) Push an item onto the beginning of the collection. Parameters mixed $value mixed $key Return Value $this

Collection::pull()

mixed pull(mixed $key, mixed $default = null) Get and remove an item from the collection. Parameters mixed $key mixed $default Return Value mixed

Collection::pop()

mixed pop() Get and remove the last item from the collection. Return Value mixed

Collection::prepend()

$this prepend(mixed $value, mixed $key = null) Push an item onto the beginning of the collection. Parameters mixed $value mixed $key Return Value $this

Collection::pluck()

Collection pluck(string $value, string|null $key = null) Get the values of a given key. Parameters string $value string|null $key Return Value Collection