我应该怎么做才能传递您在 patinate 中排序的值?
What should I do to pass the values that you order by in patinate?
routes.php
$ondata = DB::table('official_news') -> orderBy('created_date', 'desc') -> get() -> paginate(7);
return View::make('main',array('ondata' => $ondata));
错误
Call to a member function paginate() on a non-object
我需要你的帮助
这应该可以解决问题:
$ondata = DB::table('official_news')->orderBy('created_date', 'desc')->paginate(7);
这篇关于Laravel 分页顺序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!