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


PHP Activity::orderBy方法代码示例

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


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

示例1: getAdd

 public function getAdd(Request $request)
 {
     $lastActivity = Activity::orderBy('created_at', 'DESC')->first();
     $perpage = 12;
     $imgs = Img::where('img_block', '=', 'public')->orderBy('created_at', 'DESC')->simplePaginate($perpage);
     return view('manage.activity.add', ['TITLE' => '新增活动', 'META_KEYWORDS' => META_KEYWORDS, 'META_DESC' => META_DESC, 'PAGE_CODE' => '/manage/activity/add', 'lastActivity' => $lastActivity, 'imgs' => $imgs]);
 }
开发者ID:verchielxy,项目名称:jiedenuo,代码行数:7,代码来源:ActivityController.php

示例2: orderBy

 public function orderBy($column)
 {
     return \App\Activity::orderBy($column)->get();
 }
开发者ID:crow1796,项目名称:technologyRIS,代码行数:4,代码来源:ActivityLogRepository.php

示例3: activity

 public function activity()
 {
     if ($this->data['user']['level'] > 1) {
         $this->data['activities'] = Activity::orderBy('created_at', 'desc')->paginate('10');
     } else {
         $this->data['activities'] = Activity::where('user', $this->data['user']['id'])->where('level', 0)->orderBy('created_at', 'desc')->paginate('10');
     }
     return view('home.activity', $this->data);
 }
开发者ID:ralphjesy12,项目名称:cdts,代码行数:9,代码来源:StaticsController.php

示例4: data

 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function data()
 {
     $etapas = stage::orderBy('name', 'DESC')->get();
     $actividades = Activity::orderBy('name', 'DESC')->get();
     return response()->json(['etapas' => $etapas, 'actividades' => $actividades]);
 }
开发者ID:JohanArmando,项目名称:ProyectoGrado,代码行数:12,代码来源:DesignController.php

示例5: getAllActivities

 public function getAllActivities()
 {
     return Activity::orderBy('activity')->get();
 }
开发者ID:skiwei,项目名称:sayangholidays,代码行数:4,代码来源:ActivityRepository.php

示例6: proyecto

 /**
  * Show the form for creating a new resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function proyecto($id)
 {
     $etapas = stage::join('project_stage', 'project_stage.stage_id', '=', 'stages.id')->join('projects', 'projects.id', '=', 'project_stage.project_id')->where('projects.id', '=', $id)->get(['stages.*']);
     $actividades = Activity::orderBy('name', 'asc')->get();
     return response()->json(['etapas' => $etapas, 'actividades' => $actividades]);
 }
开发者ID:JohanArmando,项目名称:ProyectoGrado,代码行数:11,代码来源:ActividadPorEtapaController.php

示例7: processMaintenanceFormView

 public function processMaintenanceFormView()
 {
     $activity = Session::get('activity');
     $items = Item::lists('name', 'id')->sort();
     $old_maintenance = Session::get('maintenance');
     if ($old_maintenance == null) {
         $maintenance = new Maintenance();
         $maintenance->activity_id = $activity->id;
         $maintenance->save();
         Session::put('maintenance', $maintenance);
     } else {
         $maintenance = $old_maintenance;
     }
     $costs = Maintenance::find($maintenance->id)->items;
     $activities = Activity::orderBy('created_at', 'desc')->take(10)->get();
     return view('home', ['type' => '2', 'activity' => $activity, 'activities' => $activities, 'items' => $items, 'maintenance_id' => $maintenance->id, 'costs' => $costs]);
     // Session::forget('activity');
     //        return view('home', [ 'type'=> '2', 'activity' => $activity, 'activities' => $activities]);
 }
开发者ID:jubaedprince,项目名称:rkt,代码行数:19,代码来源:HomeController.php


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