/**
  * Responds to requests to POST /routines/delete/{id}
  */
 public function postDelete($id)
 {
     $routine = Routine::find($id);
     if (!$this->isAdminOrCreator($routine)) {
         return response('Unauthorized.', 401);
     }
     $routine->exercises()->detach();
     $routine->delete();
     \Session::flash('flash_message', 'Routine has been deleted.');
     return redirect('routines');
 }