I have an activities table, the table has fields
user_id, customer_id type
I want to check whether a activity of type
close is the first time a specific user has closed and activity for a specific customer. i.e. users first closed sale to a client.
if it is the first activity i need to update another table.
so i have all the users activities where
$closes = Activity::where('type', 'close')->where('user_id', $user->id)->get();
not sure what to do next.