diff --git a/app/Console/Commands/TabulateWinners.php b/app/Console/Commands/TabulateWinners.php index a197c2c..20b3879 100644 --- a/app/Console/Commands/TabulateWinners.php +++ b/app/Console/Commands/TabulateWinners.php @@ -62,7 +62,7 @@ class TabulateWinners extends Command function pcWinner() { - $peoplesChoiceWinnerQuery = DB::table('peoples_choice') + $peoplesChoiceWinnerQuery = PeoplesChoice::join('vehicles', 'peoples_choice.vehicle', '=', 'vehicles.id') ->groupBy('peoples_choice.vehicle') ->selectRaw('*, sum(pc_count) as totalscore') ->whereNotIn('vehicle', function($query){