code expiration fixed
This commit is contained in:
parent
f2970e4c0a
commit
4fb02f960e
@ -24,7 +24,7 @@ class UserClassesController extends Controller
|
||||
$current_date = date('Y-m-d H:i:s');
|
||||
$classes_date = $classes_item->created_at;
|
||||
$hours_difference = checkHoursDifference($classes_date, $current_date);
|
||||
if ($hours_difference > 1.5) {
|
||||
if ($hours_difference > 1.5 ) {
|
||||
$classes_item->classes_code = null;
|
||||
$classes_item->save();
|
||||
$classes_item->refresh();
|
||||
|
@ -13,6 +13,6 @@ function checkHoursDifference($dateStart, $dateEnd) {
|
||||
$dateStart = strtotime($dateStart);
|
||||
$dateEnd = strtotime($dateEnd);
|
||||
$diff = $dateEnd - $dateStart;
|
||||
$hours = floor(($diff / (60*60)));
|
||||
$hours = ($diff / (60*60));
|
||||
return $hours;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user