return response()- json($data) laravel code example
Example 1: response()->json(['data' => $allCheaters]) not getting back
return response()->json(['name' => 'Abigail', 'state' => 'CA']);
Example 2: laravel return response json
return response()->json([
'name' => 'Abigail',
'state' => 'CA',
]);