Rodrigo Pedra Brum

Results 91 comments of Rodrigo Pedra Brum

@gmutinel for the moment, you can call `->all()` on the collection when passing it to the `Arr::first()` helper. ```php $first = Arr::first($collection->all(), $callback); ``` Or use the `Collection@first()` method, which...

I'd use `Collection@all()` over `Collection@toArray()` if you are just after the first matching element. `Collection@all()` just returns the collection's `$item` inner array property, while `Collection@toArray()` calls `->toArray()` on every `Arrayable`...

As a workaround, you can force the `Sleep@goodnight()` method to be called before the instance gets destructed by calling the `Sleep@then()` method and passing a dummy callback. ```php // Sleep@then(),...

> If the application is set to maintenance and queue are paused and expected to continue after maintenance ended the queue might be running on an older version of the...

> > one should call php artisan queue:restart after deploying to ensure the new code is being used anyway. > > I would assume not everyone would be doing it...

> I'm not 100% sure if everyone would assume that `php artisan down` and `php artisan up` are always considered a new deployment. Me neither. I might have misunderstood you...

Make sure your `UserCollection` extends `Illuminate\Database\Eloquent\Collection`.

Well, the collection returned from an Eloquent model should be an Eloquent Collection. It assumes some specific methods for relation matching, and other operations.

You can try a PR. But I think it is very unlikely. Unless you provide clear use-cases, and benefits for maintaining the new class inheritance model. Actually, I don't see...

More concretely, can you share some of the code where you stumbled upon that error message?