I have been struggling to create a function that returns true if the latest transaction is 60 seconds ago and return false if it's not but nothing ever works this is my function ```php
function is60($email, $ref) {
$first = Transaction::where('email', $email)->select('created_at', 'my_ref')->latest()->first();
if ($first) {
$givenTime = Carbon::parse('2025-02-22 19:11:47', 'Africa/Lagos');
$comparisonTime = Carbon::now('Africa/Lagos')->subSeconds(60);
Log::info('Ref:', ['ref_at' => $ref]);
Log::info('compare Ref:', ['ref_at' => $first->my_ref]);
Log::info('Created At:', ['created_at' => $givenTime]);
Log::info('Comparison Time:', ['threshold_time' => $comparisonTime]);
if ($givenTime->lessThan($comparisonTime) || $first->my_ref == $ref) {
return 'true';
}
}
return 'false';
}```
This function returns always returns true regardless of whether that date is 60 seconds ago or not