我正在尝试在 Laravel 中进行分页,但我不断收到错误消息。
我试着放
->paginate(3)
返回时,但我不断收到错误,例如 Call to undefined method Laravel\Paginator::get() 和 Call to undefined method Laravel\Paginator::order_by()
public function get_index()
{
$categories = Category::all();
return View::make("stories.index")
->with("title","Sexnoveller")
->with("categories", $categories)
->with("stories", DB::table('stories')
->order_by('id', 'desc')->get());
}