The toQuery method returns a query builder instance using a whereIn on the collection model's primary keys.

use App\Models\User;

$users = User::where('status', 'VIP')->get();

$users->toQuery()->update([
    'status' => 'Administrator',
]);

This can be very useful when you want to update a large number of records without having to load them all into memory.