ShopperPanel at boot time. When an addon is disabled, none of its assets are registered.
Creating an Addon
An addon is a class that extendsShopper\Addon\BaseAddon and implements Shopper\Contracts\ShopperAddon. The contract requires four methods:
A minimal addon looks like this:
Registering an Addon
Register the addon in your application’s service provider using theShopper facade:
AddonManager checks isEnabled() before registering. If the addon is disabled via config, register() is never called and nothing is loaded.
What an Addon Can Register
Routes
Livewire Components
Sidebar Navigation
Pass a sidebar class that implements Shopper’s sidebar extension interface:Blade Views
Register a view namespace so your Blade views are accessible asanalytics::dashboard:
Settings Items
Add entries to the Settings page. Each entry is a class-string mapped to a boolean controlling its visibility:Permissions
Declare additional permissions your addon introduces. They will be seeded alongside Shopper’s built-in permissions:Styles and Scripts
Inject additional CSS or JS assets into the admin panel’s layout:Disabling an Addon
Set the addon’s ID tofalse in config/shopper/addons.php:
false, BaseAddon::isEnabled() returns false and the addon’s register() method is never called. Routes, components, sidebar entries, and assets are not loaded.