public function boot(DispatcherContract $events) { $events->listen('eloquent.booted: *', function ($model) { $model->addGlobalScope(new QueryTracer()); }); }