Beispiel #1
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $model = AdminUser::findOrFail($id);
     $modules = Module::all();
     $groups = Group::all();
     $usergroups = Sentry::findUserByID($id)->getGroups();
     return View::make("CoreCms::user.edit")->with("model", $model)->with("groups", $groups)->with("modules", $modules)->with("usergroups", $usergroups);
 }
Beispiel #2
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     $model = Group::findOrFail($id);
     return json_encode($model->delete() ? array("code" => 1) : array("code" => 0));
 }