當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。