If you are working on a BIG project with lots of tables in the database, then it will be a good trick query for you to find out a column name of any table from that database. My scenario was a bit different, I had to start work in the middle of a project … Continue reading How to find a column or filed name of a table from an entire database?
Tag: Debugging
How to print query or debug queries in Laravel
We often need to debug large queries in Laravel. And laravel have built-in functions almost for everything. Here is a simple query in laravel for example. $data = User::where(‘status’, 1) ->select(‘name’, ‘username’, ‘email’, ‘password’) ->get(); but we want to see the sql query. So we have to use toSql() in the place of get() … Continue reading How to print query or debug queries in Laravel