Laravel Collection Public API: toJson
toJson($options = 0) The toJson method will return a JSON encoded version of the data stored within the collection instance. It internally does this by returning a call to PHP's json_encode function, passing in any $options that were supplied....