$search_alls= DB::table(\'a16s as A\') ->select(\'A.id\') // ->select(\'A.*\') ->addSelect(DB::raw(\'SUM(CASE WHEN B.approve = 1 ELSE 0 E
You have to turn off sctrict mode in Laravel application.
go to config/database.php
config/database.php
under the MySQL set
strict => false
and it will start working.
Hope this helps.