seems to me like the you are using strict and it is throwing this exception because you are not setting ONLY_FULL_GROUP_BY mode on in database.php, so the query is working but can cause errors for certain cases. look at this https://mattstauffer.co/blog/strict-mode-and-other-mysql-customizations-in-laravel-5-2
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community