Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Bhavya8181/fb1b9470ede657d1d11da0a069271f85 to your computer and use it in GitHub Desktop.
Save Bhavya8181/fb1b9470ede657d1d11da0a069271f85 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