This plugin allows you to easily look ALL render hooks available in Filament on current page with a toggle.
You can install the package via composer:
composer require agencetwogether/hookshelper
You can publish the config file with:
php artisan vendor:publish --tag="hookshelper-config"
This is the contents of the published config file:
return [
/*
|--------------------------------------------------------------------------
| Render Hook
|--------------------------------------------------------------------------
| You may customize the render hook used to display the hooks visibility
| toggle button. If null, this will be set to 'global-search.before'.
| The 'panels::' prefix will be added automatically if omitted.
|
*/
'render_hook' => 'global-search.before',
/*
|--------------------------------------------------------------------------
| Icon
|--------------------------------------------------------------------------
| You may select a different Heroicon to display for the hooks visibility
| toggle button. If null, the default will be 'heroicon-m-cursor-arrow-rays'.
|
*/
'icon' => 'heroicon-m-cursor-arrow-rays',
/*
|--------------------------------------------------------------------------
| Minify Button
|--------------------------------------------------------------------------
| Setting this to true will only display a small icon as a toggle button.
| Otherwise, the button will display action label to perform.
|
*/
'tiny_toggle' => false,
];
You can publish the translations with:
php artisan vendor:publish --tag="hookshelper-translations"
Optionally, you can publish the views using
php artisan vendor:publish --tag="hookshelper-views"
First, instantiate the plugin in your Panel's configuration:
use Agencetwogether\HooksHelper\HooksHelperPlugin;
...
public function panel(Panel $panel) : Panel
{
return $panel
->plugins([
HooksHelperPlugin::make(),
]);
}
The plugin will add a toggle button to your Filament Admin Panel, left to the global search bar.
Clicking it will trigger display all hooks available in current page otherwise hide them.
The toggle button will be placed before the global search bar by default. If you want to change this, you can tweak the
render_hook
key in the config file.
You can use any of the render hooks provided by Filament.
The toggle button show an icon. If you want to change this, you can tweak the icon
key in the config file.
You can only show icon in toggle. If you want to set this, you can tweak the tiny_toggle
key in the config file.
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
- PovilasKorop for idea
The MIT License (MIT). Please see License File for more information.