select sql遇到類似這個問題:SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 解決方式:修改config/database.php中的設定: 將strict改為false,也就是取消mysql的嚴格模式的意思。 本筆記參考:1. https://stackoverflow.com/questions/40917189/laravel-syntax-error-or-access-violation-1055-error2. https://wyq2214368.github.io/2019/07/30/php/laravel-de-groupby-bao-cuo-wen-ti-chu-li/