How can I solve incompatible with sql_mode=only_full_group_by in laravel eloquent?

前端 未结 12 1706
不思量自难忘°
不思量自难忘° 2020-11-29 11:09

My laravel eloquent is like this :

$products = Product::where(\'status\', 1)
            ->where(\'stock\', \'>\', 0)
            ->where(\'category         


        
12条回答
  •  情歌与酒
    2020-11-29 11:31

    set

    'strict' => false

    in your config/database.php file. In array connections => mysql =>

    in my case I'm using mysql 5.7 Laravel 5.7

提交回复
热议问题