本文整理汇总了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]);
}
示例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]);
}
示例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);
}
示例4: getContact
public function getContact()
{
$contacts = Contact::orderBy('updated_at', 'asc')->get();
$this->assign('contacts', $contacts);
return $this->display('admin.example.contact');
}
示例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'));
}
示例6: messages
public function messages()
{
$contacts = Contact::orderBy('created_at')->paginate();
return view('admin.messages', compact('contacts'));
}
示例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'));
}
示例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'));
}
示例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']);
}
示例10: index
public function index()
{
$messages = Contact::orderBy('created_at', 'desc')->paginate(8);
return view('message')->with('messages', $messages);
}
示例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' => 'لیست تماس ها']);
}