예제 #1
0
 public function update(SessionRequest $request, $id)
 {
     $session = \App\Session::findOrFail($id);
     $session->update($request->all());
     \Session::flash('flash_message', 'Session has been updated.');
     return redirect('sessions');
 }
예제 #2
0
 public function addSession(SessionRequest $request, Session $session)
 {
     $session->session = $request->get('session');
     $saved = $session->save();
     if ($saved) {
         return redirect()->back()->with('info', 'Session saved succesfully');
     }
     return redirect()->back()->with('info', 'An unknow error occured. Please try again.');
 }
 /**
  * Update the specified resource in storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function update($id, Requests\SessionRequest $request)
 {
     $session = Auth::user()->sessions()->findOrFail($id);
     $session->exercise_id = $request->input('id');
     $session->update($request->all());
     return redirect()->action('LogController@showLog');
 }