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