PHP code example of spiral / dumper
1. Go to this page and download the library: Download spiral/dumper 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/ */
spiral / dumper example snippets
dump($variable);
use Spiral\Bootloader\Http\RoutesBootloader as BaseRoutesBootloader;
use Spiral\Debug\Middleware\DumperMiddleware;
use Spiral\Http\Middleware\ErrorHandlerMiddleware;
final class RoutesBootloader extends BaseRoutesBootloader
{
protected function globalMiddleware(): array
{
return [
ErrorHandlerMiddleware::class,
DumperMiddleware::class,
// ...
];
}
// ...
}
trap($variable);