The toJson method converts the collection into a JSON serialized string:
toJson
$collection = collect(['name' => 'Desk', 'price' => 200]); $collection->toJson(); // '{"name":"Desk", "price":200}'