我遇到了一个错误
调用未定义的方法 Illuminate\Database\Eloquent\Collection::Paginate()
我一直在做这个:
public function index ()
{
$articles = Article::latest('published_at')->published()->get()->paginate(5);
$articlesLink = $articles->render();
return view('articles.index', compact('articles', 'articlesLink'));
}