public function handle(LogManager $logger): void
    {
        $db = \resolve('db');

        $callback = $this->buildQueryCallback($logger);

        foreach ($db->getQueryLog() as $query) {
            $callback(new QueryExecuted($query['query'], $query['bindings'], $query['time'], $db));
        }

        \resolve(Dispatcher::class)->listen(QueryExecuted::class, $callback);
    }
public function handle(LogManager $logger): void
    {
        $db = \resolve('db');

        $callback = $this->buildQueryCallback($logger);

        foreach ($db->getQueryLog() as $query) {
            $callback(new QueryExecuted($query['query'], $query['bindings'], $query['time'], $db));
        }

        \resolve(Dispatcher::class)->listen(QueryExecuted::class, $callback);
    }
public function handle ( LogManager $ logger ) : void { $ db = \ resolve ( 'db' ) ; $ callback = $ this -> buildQueryCallback ( $ logger ) ; foreach ( $ db -> getQueryLog ( ) as $ query ) { $ callback ( new QueryExecuted ( $ query [ 'query' ] , $ query [ 'bindings' ] , $ query [ 'time' ] , $ db ) ) ; } \ resolve ( Dispatcher :: class ) -> listen ( QueryExecuted :: class , $ callback ) ; }
Handle the listener.

@param  \Illuminate\Log\LogManager  $logger

@return void
Handle the listener .