The best way to debug an eloquent query(Laravel)

Mohammad ALi Abd Alwahed - May 9 '23 - - Dev Community

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

Image description

. . . . . . . . . . . . . .
Terabox Video Player