Ok...
I found on the code below, that if i want to grab all the columns and they have the exact same date/time then it will only get the first item due to being grouped by created_at.
$collection = CustomerScan::where('user_id', Auth::id())->groupBy('created_at')->orderBy('created_at', 'desc')->get()->groupBy(function ($item) {
return $item->created_at->format('Y-m-d');
});
If im uploading an image and it creates the database entry in under a second for the two items then the created_at will be the exact same.
Any ideas on how i can group them by date/time without hitting this conflict?
Im still working on the other issue..
Many thanks