aiarmada/filament-promotions

A Filament v5 plugin for administering promotions provided by the AIArmada promotions package

Maintainers

Package info

github.com/AIArmada/filament-promotions

Homepage

Issues

pkg:composer/aiarmada/filament-promotions

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

v1.0.0 2026-03-08 09:35 UTC

This package is auto-updated.

Last update: 2026-03-21 04:51:07 UTC


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.