@php use \Doctrine\SqlFormatter\HtmlHighlighter; use \Doctrine\SqlFormatter\SqlFormatter; if ($this->wantsHighlighting()) { $sqlFormatter = new SqlFormatter(new HtmlHighlighter([ HtmlHighlighter::HIGHLIGHT_RESERVED => 'class="font-semibold"', HtmlHighlighter::HIGHLIGHT_QUOTE => 'class="text-purple-200"', HtmlHighlighter::HIGHLIGHT_BACKTICK_QUOTE => 'class="text-purple-200"', HtmlHighlighter::HIGHLIGHT_BOUNDARY => 'class="text-cyan-200"', HtmlHighlighter::HIGHLIGHT_NUMBER => 'class="text-orange-200"', HtmlHighlighter::HIGHLIGHT_WORD => 'class="text-orange-200"', HtmlHighlighter::HIGHLIGHT_VARIABLE => 'class="text-orange-200"', HtmlHighlighter::HIGHLIGHT_ERROR => 'class="text-red-200"', HtmlHighlighter::HIGHLIGHT_COMMENT => 'class="text-gray-400"', ], false)); } @endphp @if ($slowQueries->isEmpty()) @else Query Count Slowest @foreach ($slowQueries->take(100) as $query)
{!! $this->wantsHighlighting() ? $sqlFormatter->highlight($query->sql) : $query->sql !!} @if ($query->location)

{{ $query->location }}

@endif @if (is_array($config['threshold']))

{{ $query->threshold }}ms threshold

@endif
@if ($config['sample_rate'] < 1) ~{{ number_format($query->count * (1 / $config['sample_rate'])) }} @else {{ number_format($query->count) }} @endif @if ($query->slowest === null) Unknown @else {{ number_format($query->slowest) ?: '<1' }} ms @endif @endforeach
@endif @if ($slowQueries->count() > 100)
Limited to 100 entries
@endif