Forked from jack2jm/Check spefic time for matching criteria
Created
February 12, 2024 05:53
-
-
Save Bhavya8181/fb1b9470ede657d1d11da0a069271f85 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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