You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you have registered an EventDispatcher on the Capsule Manager you can register an event listener:
$eventDispatcher = newDispatcher(newContainer);
$capsule->setEventDispatcher($eventDispatcher);
# or alternatively if the capsule is defined already$eventDispatcher = $capsule->getEventDispatcher();
$eventDispatcher->listen(\Illuminate\Database\Events\QueryExecuted::class,
function (\Illuminate\Database\Events\QueryExecuted$query) {
// $query->sql;// $query->bindings;// $query->time;
}
);
How to write to the log using DB::listen() ?
The text was updated successfully, but these errors were encountered: