laravel 5.8 return json response code example
Example 1: php laravel return json response
return response()->json([
'name' => 'Abigail',
'state' => 'CA'
]);
Example 2: laravel json response
return response()->json([
'name' => 'Abigail',
'state' => 'CA',
]);
Example 3: Laravel json response
return response()->json($array);