i have a list of records, in my case are matches, and each match have a "date_time" that the game starts, i need to get all the matches that shows 1 hour before it starts and stays on the page after 5 hours. But i believe im not doing right, is not working right
code:
$liveMatches = SoccerMatch::where('date_time','>',Carbon::now()->subHour())
->where('date_time', '<',Carbon::now()->addHours(5))
->where('status',1)
->get();
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2w990Z7
via IFTTT
Aucun commentaire:
Enregistrer un commentaire