The best way to debug an eloquent query and enhance it is to turn it to SQL
The most simple way to do that is by adding toSql at the end of our query same as the example in the photo attached below
The best way to debug an eloquent query and enhance it is to turn it to SQL
The most simple way to do that is by adding toSql at the end of our query same as the example in the photo attached below