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


PHP Attachment::orderBy方法代码示例

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


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

示例1: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $items = Attachment::orderBy('name', 'ASC')->paginate(50);
     //        $items = Attachment::where('mime', '!=', 'text/plain')->orderBy('name', 'ASC')->paginate(50);
     $search = '';
     //        $lectures = Attachment::orderBy('name', 'ASC')->paginate(50);
     return View::make('attachment.view_attachment', compact('items', 'search'));
 }
开发者ID:alexlondon07,项目名称:accounting,代码行数:13,代码来源:AttachmentController.php

示例2: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $attachments = Attachment::orderBy('id', 'desc')->paginate(25);
     $uploads = DB::table('uploads')->select('name', 'owner', 'md5', 'sha1')->where('owner', Auth::user()->username)->orderBy('updated_at', 'desc')->paginate(25);
     $alluploads = DB::table('uploads')->select('name', 'owner', 'md5', 'sha1')->orderBy('updated_at', 'desc')->paginate(25);
     $attachmentsCount = count($attachments);
     $uploadsCount = count($uploads);
     $alluploadsCount = count($alluploads);
     return View::make('attachments.index', ['attachments' => $attachments, 'uploads' => $uploads, 'alluploads' => $alluploads, 'attachmentsCount' => $attachmentsCount, 'uploadsCount' => $uploadsCount, 'alluploadsCount' => $alluploadsCount]);
 }
开发者ID:l0ngestever,项目名称:logboek,代码行数:15,代码来源:AttachmentsController.php

示例3: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     return View::make('attachments.index', ['attachments' => Attachment::orderBy('id', 'desc')->paginate(25)]);
 }
开发者ID:y0sh1,项目名称:logboek,代码行数:9,代码来源:AttachmentsController.php

示例4: getAttachments

 protected static function getAttachments($range)
 {
     return [];
     $id = intval($range);
     if ($id != 0) {
         return Logbook::find($id)->user->attachments;
     }
     return Attachment::orderBy('id', 'asc')->get();
 }
开发者ID:y0sh1,项目名称:logboek,代码行数:9,代码来源:Export.php


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