Home>
I want to see the contents of sql with the following code, but I cannot use toSql () or DB :: enableQueryLog ().
User :: nullDeleteAt ()->approve ()->with (['userProject'])->notificationOrProjectUserId (Auth :: id ())->get ()->toArray ();
Error example
$hoge = User :: nullDeleteAt ()->approve ()->with (['userProject'])->notificationOrProjectUserId (Auth :: id ())->toSql ();
dd ($hoge);
DB :: enableQueryLog ();
User :: nullDeleteAt ()->approve ()->with (['userProject'])->notificationOrProjectUserId (Auth :: id ())->get ()->toArray ();
dd (DB :: getQueryLog ());
-
Answer # 1
Related articles
- php - i can't connect to mysql in laravel js
- i want to create a centos + nginx + laravel + mysql environment on a mac
- mysql - please tell us about the error statement for rails db: create!
- please tell me about access check boxes
- error message from mysql when opening laravel app
- laravel app mysql doesn't start
- mysql - output of aggregated value of laravel db
- php - [laravel] [mysql] cannot add data from form to database
- mysql - check constraint for insert
- php - please tell me how to modify/add multiple data with laravel upsert
- php - how to check the setting status of laravel fruitcake/laravel-cors
- mysql - heroku laravel 1142 syntax error or access violation is not fixed
- mysql - [laravel] i want to display each working category and completed category when pressing the radio button
- mysql - working with existing databases with laravel
- [laravel] please tell us how to update the model (collection) of the relation destination
- mysql - laravel review function
- php - if there is data in the db table with mysql, please tell me how to insert if there is no update
- mysql - please give us your opinion on how the auction system handles work data, bid data, and successful bid data
- mysql - garbled characters in the db data display of the laravel app deployed on heroku
- i want to use npm error mysql in laravel with js
Trends
The quickest way is to install laravel-debugbar.
https://github.com/barryvdh/laravel-debugbar