Skip to content

Instantly share code, notes, and snippets.

@jack2jm
Created February 15, 2021 13:08
Show Gist options
  • Save jack2jm/806b627f687f8f2193962228d1f47590 to your computer and use it in GitHub Desktop.
Save jack2jm/806b627f687f8f2193962228d1f47590 to your computer and use it in GitHub Desktop.
$ct_daily_time = date('H:i:s');
$is_user_entry_enabled = false;
if (strtotime($ct_daily_time) > strtotime('08:25:00') && strtotime($ct_daily_time) < strtotime('17:15:00')) {
$is_user_entry_enabled = true;
}
if (!$is_user_entry_enabled) {
return response()->json([
'status' => false,
'message' => 'Entry Restricted for this Session, Please Login as Per your Scheduled Date & Time (8.30 AM to 5.00 PM)',
]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment