Hello, I am trying to use the toSql() function for Query Builder but it is not working. I get an error
Call to a member function toSql() on array
Here is my query
$replies = DB::connection('second_connection') ->select(" SELECT id, reply_text, sending_time FROM inbox_replies "); dump($replies->toSql());
It works on Eloquent but not for raw DB query like this. What am I doing wrong here?