mako / toolbar
A debug toolbar for the Mako Framework
Installs: 17 490
Dependents: 0
Suggesters: 2
Security: 0
Stars: 5
Watchers: 3
Forks: 1
Open Issues: 0
Requires
- php: >=8.1.0
- doctrine/sql-formatter: ^1.1
- symfony/var-dumper: ^6.3
Requires (Dev)
- mako/framework: ^10.0.0-dev
- monolog/monolog: ^3.4
- phpstan/phpstan: ^1.10.32
This package is auto-updated.
Last update: 2024-10-30 22:48:14 UTC
README
Requirements
Mako 10.0 or greater.
Installation
Install the package using the following composer command:
composer require mako/toolbar
Next, add the mako\toolbar\ToolbarPackage
package to your app/config/application.php
config file.
Finally, you need to make sure that the toolbar gets rendered. The quickest way of getting it up and running is to use the included middleware.
$dispatcher->registerMiddleware(ToolbarMiddleware::class);
You should make sure that the middleware gets executed first to ensure that the toolbar is able to collect all the information about your application.
$dispatcher->setMiddlewarePriority([ToolbarMiddleware::class => 1]);
You can now add the middleware to the routes of your choice or make it global if you want to apply it to all your routes.
$dispatcher->setMiddlewareAsGlobal([ToolbarMiddleware::class]);
The middleware will only append the toolbar to responses with a content type of
text/html
and a body that includes a set of<body></body>
tags.