Skip to main content
The Lunar admin panel is highly customizable. Extensions allow adding and changing the behavior of existing Filament resources. This is useful for adding buttons, custom functionality, or modifying how data is displayed.

Extending Pages

To extend a page, create an extension class and register it with the LunarPanel facade.

Extending an edit page

The following example registers a custom extension for the EditProduct page:

Extending a list page

The following example registers a custom extension for the ListProducts page:

Extending Resources

Much like extending pages, resource extensions are created and registered with the LunarPanel facade. The following example registers a custom extension for the ProductResource:

Extendable Resources

All Lunar panel resources are extendable, allowing custom functionality to be added or existing behavior to be changed.

Events

The admin panel dispatches events for changes made through its relation managers and management pages, where an Eloquent model event alone would not describe what happened. These are useful for invalidating caches, syncing to an external system, or triggering downstream work. Every event lives in the Lunar\Admin\Events namespace and exposes a single public property, $model. For changes made through a relation manager, $model is the record that owns the relationship rather than the related record that changed. Listen for them as with any Laravel event:
These events cover changes made through the admin panel only. To react to changes from any source, including the storefront and queued jobs, observe the Eloquent model instead.