示例#1
0
 public function index()
 {
     $data = ['title' => 'Users', 'users' => Users::all()];
     $this->title->prepend($data['title']);
     View::share('menu_item_active', 'users');
     return view('root.users.index', $data);
 }
 public function add()
 {
     $login = Auth::check('member');
     if ($login['rol'] != 'administrator') {
         return $this->redirect('/');
     }
     unset($this->request->data['repeat_password']);
     unset($this->request->data['user_ok']);
     unset($this->request->data['password_ok']);
     $user = Users::create($this->request->data);
     if ($this->request->data && $user->save()) {
         $users = Users::all();
         return compact('users');
     }
     $locations = Locations::find('all', array('order' => array('district' => 'ASC')));
     foreach ($locations as $key => $location) {
         $provincie = $locations[$key]['provincie'];
         $district = $locations[$key]['district'];
         if ($login['rol'] != 'administrator') {
             if ($provincie == $login['location']) {
                 $locaties[$district] = $district . ' (' . $locations[$key]['provincie'] . ')';
             }
         } else {
             $locaties[$district] = $district . ' (' . $locations[$key]['provincie'] . ')';
         }
     }
     $actief = self::$actief;
     $breadcrumb = self::$breadcrumb;
     $breadcrumb[] = array('naam' => 'Gebruiker toevoegen');
     return compact('user', 'login', 'actief', 'breadcrumb', 'locaties');
 }
 /**
  * List all users, if accessor is authed
  *
  * @return array
  */
 public function index()
 {
     if (Auth::check('default', $this->request)) {
         return array('users' => Users::all());
     }
     return array('error' => 'Not authed');
 }
示例#4
0
 public function index()
 {
     Title::prepend('Users');
     $data = ['title' => Title::renderr(' : ', true), 'users' => Users::all()];
     view()->share('menu_item_active', 'users');
     return view('root.users.index', $data);
 }
示例#5
0
 /**
  * List users directly from Db
  */
 public function index()
 {
     $users = Model::all();
     $fields = array(array_keys($users->schema()->fields()));
     $users = $users->map(function ($model) {
         return array_values($model->data());
     }, array('collect' => false));
     $columns = array_merge($fields, $users);
     $this->columns($columns);
 }
示例#6
0
 public function index()
 {
     $users = Users::all();
     return compact('users');
 }
示例#7
0
 protected function _userSearch($query)
 {
     $conditions = array('$or' => array(array('email_address' => array('$regex' => "{$query}", '$options' => 'i')), array('firstname' => array('$regex' => "{$query}", '$options' => 'i')), array('lastname' => array('$regex' => "{$query}", '$options' => 'i'))));
     return Users::all(compact('conditions'));
 }
示例#8
0
 public function getPlayers($entity)
 {
     $conditions = array('teams' => $entity->_id);
     $order = array('gender' => -1, 'lastname' => 1, 'firstname' => 1);
     return Users::all(compact('conditions', 'order'));
 }
示例#9
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $qUsers = Users::all();
     return view('admin.user.index', compact('qUsers'));
 }