/** * Store a newly created resource in storage. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response */ public function store(Request $request) { $dataAccess = new EventMng(); $data = $request->input('data'); list($id, $title, $start, $end) = explode("&", $data); $name = Auth::user()->firstName . ' ' . Auth::user()->lastName; $dataAccess->eventSave($id, $title, $start, $end, Auth::user()->email, $name); }
/** * Store a newly created resource in storage. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response */ public function store(Request $request) { //expected array // $list = [ // 'event_id' => $id, // 'title' => $title, // 'start_time' => $start, // 'end_time' => $end, // 'client_id' => $userEmail, // 'client_name' => $name // ]; $dataAccess = new EventMng(); $dataAccess->apiEventSave($request->data); return Response::json(array('error' => false, 'data' => array('Data Saved')), 200); }