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'); }
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); }
/** * 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); }
public function index() { $users = Users::all(); return compact('users'); }
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')); }
public function getPlayers($entity) { $conditions = array('teams' => $entity->_id); $order = array('gender' => -1, 'lastname' => 1, 'firstname' => 1); return Users::all(compact('conditions', 'order')); }
/** * Display a listing of the resource. * * @return Response */ public function index() { $qUsers = Users::all(); return view('admin.user.index', compact('qUsers')); }