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