In a laravel project I want to store a new data and while checking some of attributes it is needed to check the starting and ending time(which are timestamps) doesn't overlap other database collections time range.
for example: there are 3 collections which have a start_time and an end_time as timestamps and for each one of them I want to check the new data is not between any of these ranges.
[
{
"start_time": 1594425600,
"end_time": 1594684800,
},
{
"start_time": 1594771200,
"end_time": 1595030400,
},
{
"start_time": 1595073600,
"end_time": 1595419200,
}
]
I'm using laravel 5.7 and the database is mongoDB also using Moloquent(similar to Eloquent ORM)
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire