class Listener (View source)

Properties

protected array<int, array{connectionName: string, time: float, sql: string, bindings: array}> $queries

The queries that have been executed.

Methods

void
registerListeners(Dispatcher $events)

Register the appropriate listeners on the given event dispatcher.

array<int, array{sql: string, time: float}>
queries()

Returns the queries that have been executed.

void
onQueryExecuted(QueryExecuted $event)

Listens for the query executed event.

Details

void registerListeners(Dispatcher $events)

Register the appropriate listeners on the given event dispatcher.

Parameters

Dispatcher $events

Return Value

void

array<int, array{sql: string, time: float}> queries()

Returns the queries that have been executed.

Return Value

array<int, array{sql: string, time: float}>

void onQueryExecuted(QueryExecuted $event)

Listens for the query executed event.

Parameters

QueryExecuted $event

Return Value

void

Laravel Cloud is the best place to deploy Laravel, Nuxt, Express, Hono, Node.js, Bun, Go, Flask, Python, and more, with dedicated infrastructure available on AWS through Laravel Private Cloud.