Skip to content

ArtisanPack UI home

Hooks

WordPress-style actions and filters for Laravel. Hooks lets you register callbacks on named hooks and filter values anywhere in your app — with helper functions, Facades and Blade directives, and predictable priority ordering.

v1.3.0

MIT License

★ 0

composer require artisanpack-ui/hooks
terminal
$ composer require artisanpack-ui/hooks
✓ Installed · auto-discovered

addAction('order.placed', fn($order) => /* ... */);
doAction('order.placed', $order);
applyFilters('price.display', '49.00', 'USD');

What it does

Extend anything, touch nothing

Give your app and packages clean extension points — actions to run behavior and filters to transform values, without modifying core code.

Actions & filters

Register callbacks on named hooks and filter values anywhere in your app.

Helper functions

addAction, doAction, addFilter, applyFilters and their remove* counterparts.

Facades

Prefer OO? Use the Action and Filter facades for the same API.

Blade directives

@action and @filter trigger hooks straight from your Blade views.

Priority ordering

Callbacks run in predictable priority order — lower numbers first.

Auto-discovery

Framework-native for Laravel with zero-config package discovery.

Install and start hooking

Package discovery registers everything automatically. Use addAction() / applyFilters() right away.

Install

composer require artisanpack-ui/hooks

What you need

Requirement Detail
PHP 8.2+ (8.3+ on Laravel 13)
Laravel 11.x, 12.x or 13.x
Powers the extensibility hooks used across the ArtisanPack UI ecosystem, including CMS Framework and Analytics.

Make it extensible with Hooks

Add WordPress-style actions and filters to your Laravel app in one command. Free and open source under the MIT license.