distinto laravel no funciona

$outgoings = Invoice::where('customerID', $id)
                    ->groupBy('invoiceNumber')
                    ->get();
This will work but....

Have to follow this to false strict
https://stackoverflow.com/questions/40917189/laravel-syntax-error-or-access-violation-1055-error
Lokesh003