sietseveenman / kirby3-toilet
The place for all your dumps
Installs: 3 892
Dependents: 0
Suggesters: 0
Security: 0
Stars: 18
Watchers: 3
Forks: 1
Open Issues: 0
Language:JavaScript
Type:kirby-plugin
Requires
Requires (Dev)
- symfony/var-dumper: ^6.1
This package is auto-updated.
Last update: 2024-04-12 09:37:08 UTC
README
Dump without stopping your thread or template rendering. Instead your dumps will go straight to the new Toilet panel area. There you can inspect them and flush when you are done debugging. Don't forget to wash your hands!
Notes
This project was inspired by Spatie's Ray and Laravel's Telescope. It borrows some of Telescope's code to trigger the interactive bits of the dumps on the panel area.
🚧 Warning: This project was created in a couple of days, It hasn't been tested much. Use at your own risk!
Installation
With Composer
composer require sietseveenman/kirby3-toilet
Usage
Use the poop() method anywhere.
$articles = $page->children(); poop( $articles );
poop() returns the passed variable so you can chain methods and keep your code running.
foreach( poop($articles), $item) { <a href="<?= $item->url() ?>"><?= $item->title() ?></a> } poop($payment)->isSuccessful()->doStuff();
Config
// site/config.php return [ 'sietseveenman.kirby3-toilet' => [ // Customize the timeout duration for loading fresh dumps. // Default = 2000 'poop-timeout' => 500, // Dump in silence if you want to. // Default = false 'muted' => true, // Set permission for user roles to use the toilet. // Default = ['admin'] 'roles' => ['developer', 'vegan'], ], ];