So I have this time-log entry on my mysql database.
TABLE: timelogs
- id
- employee_id
- in (datetime)
- out(datetime)
I wanted to check the entries if there times in between 10PM to 6AM.
This is to calculate the night premium for each employee.
Say a sample entry,
- in: 2022-09-09 19:34:00
- out: 2022-09-10 01:29:00
This should result that this time-log has the range to calculate the night premium.
How do I check it using Eloquent?