Below is the code example of how you can listen to the "DB" facade.
<?php use \DB; $count = 0; DB::listen(fn ($sql) => $count++); dd($count); // get the total count
1.2K
3 years ago
0 comments
<?php use \DB; $count = 0; DB::listen(fn ($sql) => $count++); dd($count); // get the total count
Frontend
Resource
Average
Average
No recent searches
Leave a reply