Published on April 22, 2018
make static method creates a new instance of a collection with the provided
$items (assuming that the provided
$items argument is not already a collection instance).
1public static function make(2 $items = 3);
The following code sample highlights the usage of the
make static method:
1use Illuminate\Support\Collection;23$items = [4 'sea' => 'Mosasaurus',5 'air' => 'Argentavis magnificens',6 'land' => 'Dusicyon australis'7];89$collection = Collection::make($items);1011// true12$isCollection = $collection instanceof Collection;
Learning text parsing, manipulation, encoding and more through the Laravel string helpers.
Published on April 11, 2018
Published on November 29, 2016
Published on November 21, 2016