-
Notifications
You must be signed in to change notification settings - Fork 1
Usage
Mark Broersen edited this page Aug 20, 2021
·
3 revisions
Dump and die
User::join('posts', 'posts.users_id', '=', 'users.id') ->select([DB::raw('SUM(posts.id)')]) ->where('users.id', 1) ->select([DB::raw('SUM(post.id)')])->qadd();or just dump
User::join('posts', 'posts.users_id', '=', 'users.id') ->select([DB::raw('SUM(posts.id)')]) ->where('users.id', 1) ->select([DB::raw('SUM(post.id)')])->qadump();both dump this array
[ 'toSql' => 'select sum(posts.id) from users join posts on posts.users_id = users.id where users.id = ?' 'bindings' => [1] 'query' => 'select sum(posts.id) from users join posts on posts.users_id = users.id where users.id = 1' ]
- To start a query log session goto {app_url}/query-adviser/
- Press play and open the pages of your app you want to log the queries of
- Stop the session and click on the session bar to see all the details.