当前位置: 首页>>代码示例>>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;未经允许,请勿转载。