Example #1
0
 public function addmenutogroup_form(Request $request)
 {
     if (AccessHelper::is_allowed()) {
         $group = GroupModel::find($request->id);
         $users = UserModel::all();
         $groups = GroupModel::all();
         $routes = RoutesModel::all();
         $groupusers = GroupUserModel::where('group_id', '=', $request->id)->get();
         $menus = GroupUserMenuAccessModel::where('group_id', '=', $request->id)->get();
         $datas = GroupModel::userGroupName(\Auth::user()->id);
         $topMenuByGroup = MenuModel::getTopMenu(\Auth::user()->id);
         return View("Base::addmenutogroup_form")->with('group', $group)->with('users', $users)->with('groupusers', $groupusers)->with('routes', $routes)->with('menus', $menus)->with('datas', $datas)->with('topMenuByGroup', $topMenuByGroup);
     } else {
         return \View('Base::Base.forbiden');
     }
 }
Example #2
0
 public function index()
 {
     $users = UserModel::all();
     return View("Users::index")->with('users', $users);
 }