/**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(Request $request)
 {
     $dataAccess = new MedMng();
     $data = $request["data"];
     $dataAccess->saveMedications($data["name"], $data["quantity"]);
     return Response::json(array('error' => false, 'data' => array("Data Saved")), 200);
     //'name: example'
     //'quantitiy: 2'
 }
 public function store(Request $request)
 {
     $dataAccess = new MedMng();
     $dataAccess->saveMedications($request->name, $request->quantity);
     return redirect('/medications');
 }