Skip to content
Advertisement

Laravel get data by time

I need to get data that has been created from 10 minutes ago till now but it returns wrong results

JavaScript

$progresses return data with time stamp of 2021-02-07T09:15:44.000000Z while this data is belong to 8 hours ago.

JavaScript

Strange thing is that in my database I don’t even have such timestamp!

one

Advertisement

Answer

Do not use from ‘where’ in here, use from whereBetween inested of where like:

JavaScript

I hope this work for you.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement