To remove the limit on the number of results returned by Eloquent queries, you can use the paginate method with a custom page size. By default, Laravel's pagination uses a page size of 15. To retrieve all 4000 users without any limit, you can set the page size to a large number or use a value that is greater than the total number of users.
Here's an example of how you can modify your query to remove the limit:
$users = User::where('column', 'value')
->paginate(4000); // Set the page size to a large number
// Or
$users = User::where('column', 'value')
->simplePaginate(4000); // Set the page size to a large number
// You can also use a value greater than the total number of users, like 9999
return view('users.index', compact('users'));
By setting the page size to a large number or a value greater than the total number of users, you will retrieve all the users without any limit in the pagination.