当前位置: 首页>>代码示例>>PHP>>正文


PHP Users::all方法代码示例

本文整理汇总了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);
 }
开发者ID:vitos8686,项目名称:0ez,代码行数:7,代码来源:UsersController.php

示例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');
 }
开发者ID:beeckmpi,项目名称:permanentielijsten,代码行数:31,代码来源:UsersController.php

示例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');
 }
开发者ID:nervetattoo,项目名称:li3-request-signing,代码行数:12,代码来源:UsersController.php

示例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);
 }
开发者ID:garf,项目名称:0ez,代码行数:7,代码来源:UsersController.php

示例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);
 }
开发者ID:nervetattoo,项目名称:li3-request-signing,代码行数:13,代码来源:Users.php

示例6: index

 public function index()
 {
     $users = Users::all();
     return compact('users');
 }
开发者ID:nilamdoc,项目名称:li3_example,代码行数:5,代码来源:UsersController.php

示例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'));
 }
开发者ID:aniston,项目名称:Platypus,代码行数:5,代码来源:UsersController.php

示例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'));
 }
开发者ID:aniston,项目名称:Platypus,代码行数:6,代码来源:Teams.php

示例9: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $qUsers = Users::all();
     return view('admin.user.index', compact('qUsers'));
 }
开发者ID:NguyenHoangThien,项目名称:learningBlog,代码行数:10,代码来源:user.php


注:本文中的app\models\Users::all方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。