-
Notifications
You must be signed in to change notification settings - Fork 0
facades
Jacob Martella edited this page Oct 16, 2025
·
2 revisions
Prefer Laravel Facades? Use Action and Filter for a static API equivalent to the helper functions.
See also: Actions, Filters, and Blade Directives.
use ArtisanPackUI\Hooks\Facades\Action;
use ArtisanPackUI\Hooks\Facades\Filter;
Action::add('user.registered', fn ($user) => \Log::info('Registered: '.$user->id));
Action::do('user.registered', $user);
Filter::add('content.summary', fn ($text) => str($text)->limit(120));
$summary = Filter::apply('content.summary', $text);- Use Facades when you prefer a static, expressive API in Laravel style.
- Use helpers when you want compact, framework-agnostic calls.
Continue to Blade Directives →