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


PHP Role::order_by方法代码示例

本文整理汇总了PHP中Role::order_by方法的典型用法代码示例。如果您正苦于以下问题:PHP Role::order_by方法的具体用法?PHP Role::order_by怎么用?PHP Role::order_by使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Role的用法示例。


在下文中一共展示了Role::order_by方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: dropdown

 public static function dropdown()
 {
     $roles = array();
     foreach (Role::order_by('name', 'asc')->get() as $role) {
         $roles[$role->id] = $role->name;
     }
     return $roles;
 }
开发者ID:neosin,项目名称:tinyissue,代码行数:8,代码来源:role.php

示例2: get_index

 public function get_index()
 {
     $this->data[$this->views] = Role::order_by('id', 'asc')->get();
     return View::make('themes.modul.' . $this->views . '.index', $this->data);
 }
开发者ID:acmadi,项目名称:diantaksi,代码行数:5,代码来源:roles.php

示例3: get_index

 public function get_index()
 {
     //        $this->data[$this->views] = Role::order_by('id', 'asc')->get();
     $this->data[$this->views] = Role::order_by('id', 'asc')->paginate(PER_PAGE_MEDIUM);
     return View::make('admin.' . $this->views . '.index', $this->data);
 }
开发者ID:rmachuca89,项目名称:tests,代码行数:6,代码来源:roles.php

示例4: get_index

 public function get_index()
 {
     return $this->layout->with('active', 'dashboard')->nest('content', 'administration.users.index', array('roles' => Role::order_by('id', 'DESC')->get()));
 }
开发者ID:niceit,项目名称:tranit-tracker,代码行数:4,代码来源:users.php

示例5: get_index

 /**
  * Displays list of roles
  *
  * @return str
  */
 public function get_index()
 {
     $roles = Role::order_by('id', 'asc')->get();
     return View::make('gotin::roles', array('roles' => $roles, 'flash' => $this->flash, 'active' => 'roles', 'b_links' => array("Roles")));
 }
开发者ID:SerdarSanri,项目名称:gotin,代码行数:10,代码来源:roles.php

示例6: roles

 function roles()
 {
     $role = new Role();
     $total_rows = $role->count();
     switch ($this->input->get('c')) {
         case "1":
             $data['col'] = "role_name";
             break;
         case "2":
             $data['col'] = "role_id";
             break;
         default:
             $data['col'] = "role_id";
     }
     if ($this->input->get('d') == "1") {
         $data['dir'] = "DESC";
     } else {
         $data['dir'] = "ASC";
     }
     $data['title'] = "Roles";
     $data['btn_add'] = anchor('users/add_role', 'Add New', "class='btn btn-primary'");
     $data['btn_home'] = anchor(base_url(), 'Home', "class='btn btn-home'");
     $uri_segment = 3;
     $offset = $this->uri->segment($uri_segment);
     $role->order_by($data['col'], $data['dir']);
     $data['role_list'] = $role->get($this->limit, $offset)->all;
     $config['base_url'] = site_url("users/roles");
     $config['total_rows'] = $total_rows;
     $config['per_page'] = $this->limit;
     $config['uri_segment'] = $uri_segment;
     $this->pagination->initialize($config);
     $data['pagination'] = $this->pagination->create_links();
     $this->load->view('users/index_roles', $data);
 }
开发者ID:anggadjava,项目名称:payroll,代码行数:34,代码来源:users.php


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