本文整理汇总了PHP中app\models\Users::all方法的典型用法代码示例。如果您正苦于以下问题:PHP Users::all方法的具体用法?PHP Users::all怎么用?PHP Users::all使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app\models\Users
的用法示例。
在下文中一共展示了Users::all方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
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);
}
示例2: add
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');
}
示例3: index
/**
* 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: index
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: index
/**
* 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: index
public function index()
{
$users = Users::all();
return compact('users');
}
示例7: _userSearch
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: getPlayers
public function getPlayers($entity)
{
$conditions = array('teams' => $entity->_id);
$order = array('gender' => -1, 'lastname' => 1, 'firstname' => 1);
return Users::all(compact('conditions', 'order'));
}
示例9: index
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
{
$qUsers = Users::all();
return view('admin.user.index', compact('qUsers'));
}