Laravel Eloquent Paginate Doesn’t Exist Error

Solution:1

Using paginate method on the query builder or an Eloquent query only, not on collection, like so:

public function view()
{
    $user = Auth::user();
    $basic_info = User::find($user->id)->basic_info;
    $category = Category::paginate(10); 

    return view('admin.article.category-view')->with(['user' => $user, 'basic_info' => $basic_info, 'category' => $category]);
}

Solution:2

You need to remove all():

 $category = Category::paginate(10); 

When you’re using all() you get all the rows from the table and get a collection

You can only invoke "paginate" on a Query, not on a Collection.