class QueryWatcher extends Watcher

Traits

Methods

__construct(array $options = [])

Create a new watcher instance.

from  Watcher
void
register(Application $app)

Register the watcher.

setOptions(array $options)

Set the watcher options.

from  Watcher
array|null
getCallerFromStackTrace(array $forgetLines = [])

Find the first frame in the stack trace outside of Telescope/Hypervel.

array
ignoredPaths()

Get the file paths that should not be used by backtraces.

bool
shouldIgnoredVendorPath()

Indicates if to ignore ignore Telescope / Hypervel packages.

void
recordQuery(QueryExecuted $event)

Record a query was executed.

array
tags(QueryExecuted $event)

Get the tags for the query.

string
familyHash(QueryExecuted $event)

Calculate the family look-up hash for the query event.

array
formatBindings(QueryExecuted $event)

Format the given bindings to strings.

string
replaceBindings(QueryExecuted $event)

Replace the placeholders with the actual bindings.

string
quoteStringBinding(QueryExecuted $event, string $binding)

Add quotes to string bindings.

Details

in Watcher at line 16
__construct(array $options = [])

Create a new watcher instance.

Parameters

array $options

the configured watcher options

at line 22
void register(Application $app)

Register the watcher.

Parameters

Application $app

Return Value

void

in Watcher at line 29
Watcher setOptions(array $options)

Set the watcher options.

Parameters

array $options

Return Value

Watcher

in FetchesStackTrace at line 15
protected array|null getCallerFromStackTrace(array $forgetLines = [])

Find the first frame in the stack trace outside of Telescope/Hypervel.

Parameters

array $forgetLines

Return Value

array|null

in FetchesStackTrace at line 32
protected array ignoredPaths()

Get the file paths that should not be used by backtraces.

Return Value

array

in FetchesStackTrace at line 49
protected bool shouldIgnoredVendorPath()

Indicates if to ignore ignore Telescope / Hypervel packages.

Return Value

bool

at line 31
void recordQuery(QueryExecuted $event)

Record a query was executed.

Parameters

QueryExecuted $event

Return Value

void

at line 57
protected array tags(QueryExecuted $event)

Get the tags for the query.

Parameters

QueryExecuted $event

Return Value

array

at line 65
string familyHash(QueryExecuted $event)

Calculate the family look-up hash for the query event.

Parameters

QueryExecuted $event

Return Value

string

at line 73
protected array formatBindings(QueryExecuted $event)

Format the given bindings to strings.

Parameters

QueryExecuted $event

Return Value

array

at line 81
string replaceBindings(QueryExecuted $event)

Replace the placeholders with the actual bindings.

Parameters

QueryExecuted $event

Return Value

string

at line 110
protected string quoteStringBinding(QueryExecuted $event, string $binding)

Add quotes to string bindings.

Parameters

QueryExecuted $event
string $binding

Return Value

string