honeybadger-io/honeybadger-laravel

View on GitHub
src/Events/DatabaseTransactionStarted.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

namespace Honeybadger\HoneybadgerLaravel\Events;

use Illuminate\Database\Events\TransactionBeginning;

class DatabaseTransactionStarted extends ApplicationEvent
{
    public string $handles = TransactionBeginning::class;

    /**
     * @param TransactionBeginning $event
     * @return EventPayload
     */
    public function getEventPayload($event): EventPayload
    {
        return new EventPayload(
            'query',
            'db.transaction.started',
            'Database transaction started',
            ['connectionName' => $event->connectionName],
        );
    }
}