return response()->json($array, 202,
[
'Content-Type' => 'application/json',
'Charset' => 'utf-8'
], JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
}
$json = '{"countryId":"84","productId":"1","status":"0","opId":"134"}';
$json = json_decode($json, true);
echo $json['countryId'];
echo $json['productId'];
echo $json['status'];
echo $json['opId'];
$json = json_decode($json, true);
print($json['username']);
return response()->json([
'name' => 'Abigail',
'state' => 'CA',
]);
return response()->json($array);
Route::get('/status', function () {
return response(["success" => true])->header('Content-Type', 'application/json');
});
return Response::json(['success' => true,'message'=>'Student inserted successfully']);