123456789101112131415 |
- <?php
- namespace App\Listeners;
- use Illuminate\Database\Events\QueryExecuted;
- class QueryExecutedListener
- {
- public function handle(QueryExecuted $event)
- {
- // If triggered, will be shown in addition to the controller response.
- // Don't use dd() as it includes a die() so the results are not stored.
- echo $event->sql;
- }
- }
|