class QueryExecuted (View source)

Properties

string $sql

The SQL query that was executed.

array $bindings

The array of query bindings.

float $time

The number of milliseconds it took to execute the query.

Connection $connection

The database connection instance.

string $connectionName

The database connection name.

null|"read"|"write"|"direct" $readWriteType

The PDO read / write type for the executed query.

Methods

__construct(string $sql, array $bindings, float|null $time, Connection $connection, null|"read"|"write"|"direct" $readWriteType = null)

Create a new event instance.

string
toRawSql()

Get the raw SQL representation of the query with embedded bindings.

Details

__construct(string $sql, array $bindings, float|null $time, Connection $connection, null|"read"|"write"|"direct" $readWriteType = null)

Create a new event instance.

Parameters

string $sql
array $bindings
float|null $time
Connection $connection
null|"read"|"write"|"direct" $readWriteType

string toRawSql()

Get the raw SQL representation of the query with embedded bindings.

Return Value

string

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.