$collection = collect(json_decode($response));
$items = $collection->where('id', 25);
Last active
October 24, 2024 13:02
-
-
Save vades/2b294523db53569ffe6f7d6804cc4e7e to your computer and use it in GitHub Desktop.
Convert JSON data to Eloquent collection in Laravel application
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
that would make it a collection and not an eloquent model, that is to say... it would be a collection object but it would not be an instance of, for example, User