Server IP : 66.29.132.124 / Your IP : 18.227.134.165 Web Server : LiteSpeed System : Linux business141.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : wavevlvu ( 1524) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/wavevlvu/book24.ng/vendor/facade/ignition/src/QueryRecorder/ |
Upload File : |
<?php namespace Facade\Ignition\QueryRecorder; use Illuminate\Database\Events\QueryExecuted; class Query { /** @var string */ protected $sql; /** @var float */ protected $time; /** @var string */ protected $connectionName; /** @var null|array */ protected $bindings; /** @var float */ protected $microtime; public static function fromQueryExecutedEvent(QueryExecuted $queryExecuted, bool $reportBindings = false) { return new static( $queryExecuted->sql, $queryExecuted->time, $queryExecuted->connectionName ?? '', $reportBindings ? $queryExecuted->bindings : null ); } protected function __construct( string $sql, float $time, string $connectionName, ?array $bindings = null, ?float $microtime = null ) { $this->sql = $sql; $this->time = $time; $this->connectionName = $connectionName; $this->bindings = $bindings; $this->microtime = $microtime ?? microtime(true); } public function toArray(): array { return [ 'sql' => $this->sql, 'time' => $this->time, 'connection_name' => $this->connectionName, 'bindings' => $this->bindings, 'microtime' => $this->microtime, ]; } }