DEV Community

Cover image for The best way to debug an eloquent query(Laravel)
Mohammad Ali Abdul Wahed
Mohammad Ali Abdul Wahed

Posted on

The best way to debug an eloquent query(Laravel)

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

Top comments (0)