SQLSTATE[HY000]: General error: 3065 Expression #1 of ORDER BY clause is not in SELECT list, references column 'messages.created_at' which is not in SELECT list; this is incompatible with DISTINCT
Any solution? i solved this issue by adding [mysqld] (newline) sql_mode = '' on my "my.cnf" file. And now it works fine on PhpMyAdmin but the query on Laravel still crashes