Simply trying to use the example straight from the docs throws this error. I'm banging my head against the wall, I tried everything.
$collection = Collection::make([1, 2, 3]);
Despite the above being pulled right from the docs I get this:
BadMethodCallException in Builder.php line 1992:
Call to undefined method Illuminate\Database\Query\Builder::make()
Need to know how to make a custom collection from an array. I do not understand why this is difficult.
To create collection you can simply use
collect
helper method this way:which is equivalent to: