Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function handle()
- {
- $matches = AppMatch::where('status', 'open')->get();
- foreach($matches as $match) {
- if($match->teamA->name == 'TBD' || $match->teamB->name == 'TBD') {
- continue;
- }
- if(CarbonCarbon::now()->diffInSeconds($match->schedule, false) <= 0 && !$match->re_opened) {
- $this->info('[' . CarbonCarbon::now()->addSeconds(10)->diffForHumans() . '] Found match [Match ID: ' . $match->id . '] ' . $match->name . ' - closing...');
- setupOngoingMatch($match);
- }
- }
- }
- if(CarbonCarbon::now()->addSeconds(60)->diffForHumans()->diffInSeconds($match->schedule, false) <= 0 && !$match->re_opened)
Add Comment
Please, Sign In to add comment