$json = json_decode($json, true);
print($json['username']);
//Get output from your browser network.
return response()->json([$laravelVariable]);
return response()->json([
'name' => 'Abigail',
'state' => 'CA',
]);
return response()->json($array);
class Paste extends Model {
protected $casts = [
'data' => 'array'
];
}
Route::get('/status', function () {
return response(["success" => true])->header('Content-Type', 'application/json');
});
return Response::json(['success' => true,'message'=>'Student inserted successfully']);