/** * @return \Illuminate\View\View */ public function disableSelected(Request $request) { //TODO: Should we protect 'admins', 'users'?? $chkRoles = $request->input('chkRole'); if (isset($chkRoles)) { foreach ($chkRoles as $role_id) { $role = $this->role->find($role_id); $role->enabled = false; $role->save(); } Flash::success(trans('admin/roles/general.status.global-disabled')); } else { Flash::warning(trans('admin/roles/general.status.no-role-selected')); } return redirect('/admin/roles'); }
/** * @param Request $request * @return mixed */ public function getInfo(Request $request) { $id = $request->input('id'); $role = $this->role->find($id); return $role; }