If you've used WordPress hooks, you already know how this works. Actions and filters let any module extend or modify behavior — without touching core code.
// Register an action in your module's service provider
ld_add_action(
'user.created',
function (User $user) {
// Send welcome email, sync to CRM, log activity...
Notification::send($user, new WelcomeEmail);
}
);
// Core fires the action — all listeners run automatically
ld_do_action('user.created', $user);
// Add a filter to modify dashboard menu items
ld_add_filter(
'dashboard.menu_items',
function (array $items) {
$items[] = [
'title' => 'CRM',
'icon' => 'users',
'route' => 'crm.contacts.index',
];
return $items;
}
);
// Core applies the filter — all modifications compose
$menuItems = ld_apply_filters('dashboard.menu_items', $defaultItems);
Modify posts, pages, categories, and tags before saving or displaying.
ContentActionHook, ContentFilterHook
Hook into user creation, updates, deletion, and role changes.
UserActionHook, UserFilterHook
Add widgets, modify menus, and extend the admin dashboard.
DashboardFilterHook
Modify email content, add recipients, and hook into send/receive events.
EmailActionHook
Extend AI capabilities — add custom AI providers, modify AI responses.
AIFilterHook
Add custom blocks to the page builder, modify rendering behavior.
BuilderActionHook, BuilderFilterHook
| Concept | WordPress | Lara Dashboard |
|---|---|---|
| Register action | add_action() | ld_add_action() |
| Fire action | do_action() | ld_do_action() |
| Register filter | add_filter() | ld_add_filter() |
| Apply filter | apply_filters() | ld_apply_filters() |
| Type safety | String-based hook names | Enum-backed hook names (type-safe) |
Start for free with our open-source core. No credit card required, no hidden costs. Just powerful tools to build your next Laravel application.