/**
  * Update the specified resource in storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function update($id, Request $request)
 {
     $vld = Group::validate($request->all(), $id);
     if (!$vld->passes()) {
         return \Redirect::back()->withErrors($vld->messages());
     }
     $groups = Group::find($id);
     $groups->update(['groupname' => $request->get('groupname'), 'description' => $request->get('description')]);
     return redirect()->route('groups.index')->with('messageOk', 'Update group successfully!');
 }