Answers for "laravel collection toJson"

PHP
0

laravel collection toJson

$collection = collect(['name' => 'Desk', 'price' => 200]);

$collection->toJson();

// '{"name":"Desk", "price":200}'
Posted by: Guest on July-24-2021

Browse Popular Code Answers by Language