當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Contact::orderBy方法代碼示例

本文整理匯總了PHP中app\Contact::orderBy方法的典型用法代碼示例。如果您正苦於以下問題:PHP Contact::orderBy方法的具體用法?PHP Contact::orderBy怎麽用?PHP Contact::orderBy使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在app\Contact的用法示例。


在下文中一共展示了Contact::orderBy方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: index

 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $contacts = Contact::orderBy('id', 'desc')->paginate(10);
     $option = Option::findOrFail(1);
     $featured_properties = Property::where('Heat_inc', '=', 'Yes')->get();
     return view('home', ['contacts' => $contacts, 'option' => $option, 'featured_properties' => $featured_properties]);
 }
開發者ID:arjunadotfusion,項目名稱:laravelformin,代碼行數:12,代碼來源:HomeController.php

示例2: index

 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index(Request $request)
 {
     $contacts = Contact::orderBy('created_at', 'desc')->get();
     if ($request->ajax()) {
         return $contacts->toArray();
     }
     return view('admin.contacts.index', ['contacts' => $contacts]);
 }
開發者ID:phantsang,項目名稱:1u0U39rjwJO4Vmnt99uk9j6,代碼行數:13,代碼來源:ContactsController.php

示例3: index

 /**
  * Display a listing of contacts
  *
  * @return Response
  */
 public function index(Request $request, $obra_id = null)
 {
     if ($obra_id != null) {
         $project = Project::find($obra_id)->get();
         dd($project);
         $contacts = $project->contacts;
     } else {
         $contacts = Contact::orderBy($request->input('orderby', 'email'), $request->input('order', 'ASC'))->paginate($request->input('paginate', 50));
     }
     return view('contacts.index')->with('contacts', $contacts);
 }
開發者ID:system3d,項目名稱:consultas-tecnicas,代碼行數:16,代碼來源:ContactController.php

示例4: getContact

 public function getContact()
 {
     $contacts = Contact::orderBy('updated_at', 'asc')->get();
     $this->assign('contacts', $contacts);
     return $this->display('admin.example.contact');
 }
開發者ID:sylvanasGG,項目名稱:laravel_lte,代碼行數:6,代碼來源:ExampleController.php

示例5: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $contacts = Contact::orderBy('id', 'desc')->paginate(10);
     return view('contacts.index', compact('contacts'));
 }
開發者ID:arjunadotfusion,項目名稱:laravelformin,代碼行數:10,代碼來源:ContactController.php

示例6: messages

 public function messages()
 {
     $contacts = Contact::orderBy('created_at')->paginate();
     return view('admin.messages', compact('contacts'));
 }
開發者ID:charlieboo,項目名稱:creatrip,代碼行數:5,代碼來源:UsersController.php

示例7: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $contact = Contact::orderBy('updated_at', 'desc')->paginate(50);
     return view('admin.contact.index', compact('contact'));
 }
開發者ID:thibaultvanc,項目名稱:organit,代碼行數:10,代碼來源:ContactController.php

示例8: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $contact = Contact::orderBy('status', 'asc')->paginate(4);
     return view('contacts.index', compact('contact'));
 }
開發者ID:hoangvu2015,項目名稱:laravel_totnghiep,代碼行數:10,代碼來源:ContactController.php

示例9: index

 public function index()
 {
     $contacts = Contact::orderBy('id', 'asc')->get();
     return view('contacts', ['contacts' => $contacts, 'loggedUser' => $this->user, 'hash' => $this->hash, 'title' => 'Dashboard - Contacts']);
 }
開發者ID:roblesterjr04,項目名稱:project-crm,代碼行數:5,代碼來源:ContactsController.php

示例10: index

 public function index()
 {
     $messages = Contact::orderBy('created_at', 'desc')->paginate(8);
     return view('message')->with('messages', $messages);
 }
開發者ID:sopnopriyo,項目名稱:sopnopriyo,代碼行數:5,代碼來源:ContactController.php

示例11: adminIndex

 public function adminIndex()
 {
     $contacts = Contact::orderBy('id', 'DESC')->paginate(Config::get('nafisConfig.perPage'));
     //dd($contacts->total());
     return view('admin.contactAdminIndex', compact('contacts'))->with(['title' => 'لیست تماس ها']);
 }
開發者ID:slifer2015,項目名稱:tarabar,代碼行數:6,代碼來源:ContactController.php


注:本文中的app\Contact::orderBy方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。