/** * Get game info from last match for display in first page * @return \Illuminate\Database\Eloquent\Model|null|static */ public function LastMatch() { $match = FootballMatches::whereIn('status', ['FT', 'AET'])->whereDate('formatted_date', '<=', Date::today()->format('Y-m-d'))->orderBy('formatted_date', 'desc')->first(); return $match; }