And how many records do you get if you run this:
$result = Ticket::whereIn('reg', ["1900315150","1900318748","1900310306","1900320420","1900316811"])->count();
dd($result);
?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi,
There s a very strange behavior of Eloquent. I have a model called - tickets. The action is just to update (Mass Assignment) using "whereIn"...
This is a sample:
Ticket::whereIn('reg', ["1900315150","1900318748","1900310306","1900320420","1900316811"])->update(['user' => 1, 'status' => 1]);
But when I query - right after that -, comes 10 results!
How come?
Thanks in advance everyone here that can give a hand on this.
Regards,
This is not the problem. I am using the same way now and working.
@nakov :
#1 Removed Chrome. Installed again without sync with my account. Everything worked! #2 Sync Chrome with my account - the problem began again!
#3 Disable every extension and repeat the process again until find that SAFE TORRENT was causing the problem! Remove that extension, run the page again, and everything worked properly!
And now I am doing update inside a loop because it is necessary to attribute the "user id" in block of 30 (here to present you all, I just considered take 3 regists) and everyhting still working as expected.
The big lesson :
Once the code part is over, it is good to consider the browser and going a little deeper, continue eliminating its extensions one by one, repeat the routine and see the result.
Please or to participate in this conversation.