Everything is working fine, until I used the select() method like this code below:
(new User)->select(['name', 'email'])->get();
This is the error message:
Fatal error: Uncaught PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '* FROM users' at line 1
Everything is working fine, until I used the
select()
method like this code below:This is the error message: