Using put method on Laravel Eloquent Collection will always return an array
Clash Royale CLAN TAG #URR8PPP Using put method on Laravel Eloquent Collection will always return an array I am using Lumen (Laravel Eloquent ORM) to create a web service to use in conjunction with an app I am working on. I have a Joomla website, which I use Lumen to access resources I need from the db. I'm using Lumen to get these resources into a collection, then return a new JSON object. To give an overview of the problem, I am creating two Collections: I want Laravel to return a JSON object for Collection 0 (above), which will include a JSON Array containing the data of Collection 1. Here is my code: <?php $current = Card::find($id); //Collection 0 $information = $current -> cardData -> map(function($col) return collect($col -> toArray()) ->only(['id', 'ccard_cardno', 'ccard_year', 'ccard_catc', 'ccard_catt', 'ccard_issued', 'ccard_valc', 'ccard_valtod', 'ccard_valfac', 'ccard_man...