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


PHP Owner::orderBy方法代码示例

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


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

示例1: sortur

 public function sortur()
 {
     $valu = $_GET['valu'];
     $type = $_GET['type'];
     Session::put('valu', $valu);
     Session::put('type', $type);
     if ($type == 'userid') {
         $typename = "Owner ID";
         $users = Owner::orderBy('id', $valu)->paginate(10);
     } elseif ($type == 'username') {
         $typename = "Owner Name";
         $users = Owner::orderBy('first_name', $valu)->paginate(10);
     } elseif ($type == 'useremail') {
         $typename = "Owner Email";
         $users = Owner::orderBy('email', $valu)->paginate(10);
     }
     $title = ucwords(trans('customize.User') . 's' . " | Sorted by " . $typename . " in " . $valu);
     /* 'Owners | Sorted by ' . $typename . ' in ' . $valu */
     return View::make('owners')->with('title', $title)->with('page', 'owners')->with('owners', $users);
 }
开发者ID:felipemarques8,项目名称:goentregas,代码行数:20,代码来源:AdminController.php

示例2: sortur

 public function sortur()
 {
     $valu = $_GET['valu'];
     $type = $_GET['type'];
     Session::put('valu', $valu);
     Session::put('type', $type);
     if ($type == 'userid') {
         $typename = "User ID";
         $users = Owner::orderBy('id', $valu)->paginate(10);
     } elseif ($type == 'username') {
         $typename = "User Name";
         $users = Owner::orderBy('first_name', $valu)->paginate(10);
     } elseif ($type == 'useremail') {
         $typename = "User Email";
         $users = Owner::orderBy('email', $valu)->paginate(10);
     }
     return View::make('owners')->with('title', 'Owners | Sorted by ' . $typename . ' in ' . $valu)->with('page', 'owners')->with('owners', $users);
 }
开发者ID:netGALAXYStudios,项目名称:ourmovingapp,代码行数:18,代码来源:AdminController.php


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