aiarmada / filament-promotions
A Filament v5 plugin for administering promotions provided by the AIArmada promotions package
v1.0.0
2026-03-21 04:17 UTC
Requires
- php: ^8.4
- composer-runtime-api: ^2.1
- ext-intl: *
Requires (Dev)
- akaunting/laravel-money: ^6.0
- anourvalar/eloquent-serialize: ^1.2
- chillerlan/php-qrcode: ^5.0
- filament/blueprint: ^2.0
- filament/filament: ^5.0
- filament/spatie-laravel-media-library-plugin: ^5.0
- filament/support: *
- guzzlehttp/guzzle: ^7.0
- larastan/larastan: ^3.0
- laravel/boost: ^2.0
- laravel/cashier: ^16.0
- laravel/framework: ^12.0|^13.0
- laravel/pint: ^1.0
- laravel/prompts: ^0.3.5
- league/csv: ^9.27
- league/flysystem-aws-s3-v3: ^3.0
- lorisleiva/laravel-actions: ^2.9
- nunomaduro/essentials: ^1.0
- nunomaduro/termwind: ^2.0
- openspout/openspout: ^4.23
- orchestra/testbench: ^10.0|^11.0
- owen-it/laravel-auditing: ^14.0
- pestphp/pest: ^4.0
- pestphp/pest-plugin-laravel: ^4.0
- phiki/phiki: ^2.0
- phpstan/extension-installer: ^1.1
- phpstan/phpstan: ^2.1
- pragmarx/google2fa: ^8.0
- pragmarx/google2fa-qrcode: ^3.0
- rector/rector: ^2.0
- spatie/browsershot: ^5.0
- spatie/laravel-activitylog: ^4.10
- spatie/laravel-data: ^4.18
- spatie/laravel-health: ^1.34
- spatie/laravel-medialibrary: ^11.0
- spatie/laravel-model-states: ^2.8
- spatie/laravel-package-tools: ^1.92
- spatie/laravel-pdf: ^2.4
- spatie/laravel-permission: ^7.2
- spatie/laravel-ray: ^1.29
- spatie/laravel-settings: ^3.6
- spatie/laravel-sluggable: ^3.7
- spatie/laravel-tags: ^4.2
- spatie/laravel-webhook-client: ^3.4
- staudenmeir/belongs-to-through: ^2.5
- staudenmeir/eloquent-has-many-deep: ^1.7
- symplify/monorepo-builder: ^12.5
README
A Filament v5 plugin for managing promotional discounts in your admin panel.
Features
- Full CRUD — Create, view, edit, and delete promotions
- Rich Table — Sortable, filterable promotion list with badges
- Promotion Types — Percentage, fixed amount, and Buy X Get Y
- Usage Tracking — Monitor promotion usage statistics
- Owner Scoping — Multi-tenant support out of the box
- Stats Widget — Dashboard overview of promotion metrics
Requirements
- PHP 8.4+
- Laravel 12+
- Filament 5.0+
- aiarmada/promotions package
Installation
composer require aiarmada/filament-promotions
Register the plugin in your Filament panel:
use AIArmada\FilamentPromotions\FilamentPromotionsPlugin; public function panel(Panel $panel): Panel { return $panel ->plugins([ FilamentPromotionsPlugin::make(), ]); }
Optionally publish the config:
php artisan vendor:publish --tag=filament-promotions-config
Configuration
// config/filament-promotions.php return [ 'navigation_group' => 'Marketing', 'resources' => [ 'navigation_sort' => [ 'promotions' => 10, ], ], 'tables' => [ 'poll' => null, ], 'features' => [ 'widgets' => true, ], ];
Usage
Managing Promotions
The plugin provides a PromotionResource with:
- List View — Table with search, filters, and bulk actions
- Create View — Form to create new promotions
- Edit View — Update existing promotions
- View View — Detailed promotion information
Promotion Types
The Filament-aware PromotionType enum includes:
| Type | Label | Icon | Color |
|---|---|---|---|
Percentage |
Percentage Off | receipt-percent | success |
Fixed |
Fixed Amount | currency-dollar | info |
BuyXGetY |
Buy X Get Y | gift | warning |
Stats Widget
Add the stats widget to your dashboard:
use AIArmada\FilamentPromotions\Widgets\PromotionStatsWidget; public function panel(Panel $panel): Panel { return $panel ->widgets([ PromotionStatsWidget::class, ]); }
Multi-tenancy
The resource respects owner scoping from the promotions package. Configure in config/promotions.php:
'features' => [ 'owner' => [ 'enabled' => true, 'include_global' => true, ], ],
License
MIT License. See LICENSE for details.