PHP code example of zappzarapp / devtoolbar
1. Go to this page and download the library: Download zappzarapp/devtoolbar library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
zappzarapp / devtoolbar example snippets
use Zappzarapp\DevToolbar\DevToolbar;
use Zappzarapp\DevToolbar\Guard\DevToolbarGuard;
lbar->boot();
// injectToolbar() runs when the buffer is flushed — a safe alternative
// to echoing from a shutdown function.
ob_start([$toolbar, 'injectToolbar']);
}
// ... dispatch the request and render the response as usual ...
$toolbar->setNonce($cspNonce);
$queries = $toolbar->getCollector('queries');
$queries?->trackQuery($sql, $bindings, $durationMs);