Hooks Helper plugin screenshot
Dark mode ready
Multilingual support
Supports v5.x

Hooks Helper by AgenceTwogether

Community

Simple plugin to toggle display hooks available in current page.

Tags: Developer Tool Panels
Supported versions:
5.x 4.x 3.x
AgenceTwogether avatar Author: AgenceTwogether

Package health

Automated checks of this plugin's Composer package

80 / 100
Security 64
Maintenance 100
Ecosystem 100
15 checks
  • Failed: GitHub Actions pinned to SHA — View details on Plumb
  • Skipped: GitLab CI includes pinned to SHA
  • Passed: Open security advisories
  • Passed: Dependabot PR responsiveness — No open Dependabot PRs.
  • Skipped: Renovate MR responsiveness
  • Warning: Dependabot or Renovate configured — Updater does not cover the JavaScript ecosystem, which has a committed lockfile.
  • Failed: Dependency update cooldown configured — No cooldown configured in .github/dependabot.yml. View details on Plumb
  • Passed: Provides a security policy
  • Passed: Abandoned or archived — No consulted source marks the package abandoned (packagist, github).
  • Passed: Commit and release recency — Active: last commit 0 days ago; last release 51 days ago.
  • Passed: composer.lock not committed by library — composer.lock is absent from the released dist archive.
  • Passed: Dist archive is lean
  • Passed: Current Laravel version supported — Package dependencies resolve together with current Laravel 13.0.
  • Passed: Current PHP version supported — Constraint ^8.1 supports current PHP 8.5.
  • Skipped: Current Symfony version supported
Third-party plugin. This is built by the community, not the Filament team. Filament does not review, endorse, or vet the security of plugins outside the filament/ namespace. Review the source and install at your own risk. Found malware or an unresolved security issue the author won't address? Report it .
Powered by Plumb Last scanned 1 month ago

Documentation

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This plugin allows you to easily look ALL render hooks available in Filament on current page with a toggle.

#Table of contents

#Installation

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"

#Setup

Requirement: this plugin doesn't change any authorization logic, but it does surface an unrelated Filament requirement you may hit while testing it across environments: your User model must implement canAccessPanel(Panel $panel): bool from Filament\Models\Contracts\FilamentUser, otherwise Filament returns a 403 for every panel, regardless of this plugin's state.

use Filament\Models\Contracts\FilamentUser;
use Filament\Panel;

class User extends Authenticatable implements FilamentUser
{
    public function canAccessPanel(Panel $panel): bool
    {
        return true; // or your own logic (role check, environment check, ...)
    }
}

First, instantiate the plugin in your Panel's configuration:

use Agencetwogether\HooksHelper\HooksHelperPlugin;

...

public function panel(Panel $panel) : Panel
{
    return $panel
        ->plugins([
            HooksHelperPlugin::make(),
        ]);
}

#Activation by environment

By default, the plugin only activates itself when APP_ENV=local. In any other environment (staging, production, testing, ...) it registers nothing at all, so there's no risk of the hooks switcher or debug overlays leaking into production.

If you want the plugin to stay active regardless of the environment, chain ->alwaysEnabled() when registering it:

use Agencetwogether\HooksHelper\HooksHelperPlugin;

...

public function panel(Panel $panel) : Panel
{
    return $panel
        ->plugins([
            HooksHelperPlugin::make()->alwaysEnabled(),
        ]);
}

#Usage

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.

image

image

#Placement

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.

#Icon

The toggle button show an icon. If you want to change this, you can tweak the icon key in the config file.

#Minify toggle

You can only show icon in toggle. If you want to set this, you can tweak the tiny_toggle key in the config file.

#Changelog

Please see CHANGELOG for more information on what has changed recently.

#Contributing

Please see CONTRIBUTING for details.

#Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

#Credits

#Thanks

#License

The MIT License (MIT). Please see License File for more information.