1. sql_model = only_full_group_byを削除します。
2. config / database.phpで厳密なLaravelフレームワークはデフォルトでtrueになり、falseに変更されます。