Overview
The Lunar Panel is highly customizable, you can add and change the behaviour of existing Filament resources. This might be useful if you wish to add a button for additional custom functionality.
Extending Pages
To extend a page you need to create and register an extension.
Extending edit resource
For example, the code below will register a custom extension called MyEditExtension
for the EditProduct
Filament page.
use Lunar\Admin\Support\Facades\LunarPanel;
use Lunar\Panel\Filament\Resources\ProductResource\Pages\EditProduct;
use App\Admin\Filament\Resources\Pages\MyEditExtension;
LunarPanel::extensions([
EditProduct::class => MyEditExtension::class,
]);
Extending list resource
For example, the code below will register a custom extension called MyListExtension
for the ListProduct
Filament page.
use Lunar\Admin\Support\Facades\LunarPanel;
use Lunar\Panel\Filament\Resources\ProductResource\Pages\ListProduct;
use App\Admin\Filament\Resources\Pages\MyEditExtension;
LunarPanel::extensions([
ListProduct::class => MyListExtension::class,
]);
Extending Resources
Much like extending pages, to extend a resource you need to create and register an extension.
For example, the code below will register a custom extension called MyProductResourceExtension
for the ProductResource
Filament resource.
use Lunar\Admin\Support\Facades\LunarPanel;
use Lunar\Panel\Filament\Resources\ProductResource;
use App\Admin\Filament\Resources\MyProductResourceExtension;
LunarPanel::extensions([
ProductResource::class => MyProductResourceExtension::class,
]);
Extendable resources
All Lunar panel resources are extendable. This means you can now add your own functionality or change out existing behaviour.
use Lunar\Panel\Filament\Resources\ActivityResource;
use Lunar\Panel\Filament\Resources\AttributeGroupResource;
use Lunar\Panel\Filament\Resources\BrandResource;
use Lunar\Panel\Filament\Resources\ChannelResource;
use Lunar\Panel\Filament\Resources\CollectionGroupResource;
use Lunar\Panel\Filament\Resources\CollectionResource;
use Lunar\Panel\Filament\Resources\CurrencyResource;
use Lunar\Panel\Filament\Resources\CustomerGroupResource;
use Lunar\Panel\Filament\Resources\CustomerResource;
use Lunar\Panel\Filament\Resources\DiscountResource;
use Lunar\Panel\Filament\Resources\LanguageReousrce;
use Lunar\Panel\Filament\Resources\OrderResource;
use Lunar\Panel\Filament\Resources\ProductOptionrResource;
use Lunar\Panel\Filament\Resources\ProductResource;
use Lunar\Panel\Filament\Resources\ProductResource;
use Lunar\Panel\Filament\Resources\ProductTypeResource;
use Lunar\Panel\Filament\Resources\ProductVariantResource;
use Lunar\Panel\Filament\Resources\StaffResource;
use Lunar\Panel\Filament\Resources\TagResource;
use Lunar\Panel\Filament\Resources\TaxClassResource;
use Lunar\Panel\Filament\Resources\TaxZoneResource;