/**
  * Remove the specified resource from storage.
  *
  * @param  int $id
  * @param OsjsService $service
  * @return \Illuminate\Http\Response
  */
 public function destroy($id, OsjsService $service)
 {
     $group = UserGroup::findOrFail($id);
     $name = $this->organization->uuid . "-" . $group->name;
     if ($path = $service->deleteDirectory('group', $name)) {
         $group->delete();
         Flash::success(Lang::get('groups.destroy-success'));
     } else {
         Flash::error(Lang::get('groups.destroy-failed'));
     }
     return redirect(action('UsersManagementController@index') . '#orgagroups');
 }
 /**
  * Remove the specified resource from storage.
  *
  * @param  int $id
  * @param OsjsService $service
  * @return \Illuminate\Http\Response
  */
 public function destroy($id, OsjsService $service)
 {
     $user = User::findOrFail($id);
     if ($path = $service->deleteDirectory('user', $user->username)) {
         $user->delete();
         Flash::success(Lang::get('users.destroy-success'));
     } else {
         Flash::error(Lang::get('users.destroy-failed'));
     }
     return redirect(action('UsersManagementController@index') . '#orgausers');
 }