athphane/filament-support

Helper traits, base component configs, and shared utilities.

Fund package maintenance!
athphane

Installs: 4

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/athphane/filament-support

v1.0.0 2026-02-25 18:56 UTC

This package is auto-updated.

Last update: 2026-02-25 19:19:03 UTC


README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Helper traits, base component configs, and shared utilities for Filament.

Installation

You can install the package via composer:

composer require athphane/filament-support

You can publish the config file with:

php artisan vendor:publish --tag="filament-support-config"

Configuration

The published config file allows you to enable/disable specific modifiers:

// config/filament-support.php

return [
    'modifiers' => [
        'forms' => env('FILAMENT_SUPPORT_MODIFIER_FORMS', true),
        'actions' => env('FILAMENT_SUPPORT_MODIFIER_ACTIONS', true),
        'tables' => env('FILAMENT_SUPPORT_MODIFIER_TABLES', true),
        'infolists' => env('FILAMENT_SUPPORT_MODIFIER_INFOLISTS', true),
        'summarizers' => env('FILAMENT_SUPPORT_MODIFIER_SUMMARIZERS', true),
    ],
];

All modifiers are enabled by default.

Features

Modifiers

The package provides automatic configuration for Filament components:

  • Forms: Auto-title labels, trim text input values, native date pickers, helper icons
  • Actions: Set icon positions and default icons
  • Tables: Title case labels, non-native filters, hidden on relation manager macro
  • Infolists: Title case labels, enum display macro
  • Summarizers: Default money summarizer

Components

Coordinate (Form Component)

A Google Maps coordinate picker for Filament forms.

use Athphane\FilamentSupport\Forms\Components\Coordinate;

Coordinate::make('coordinates')
    ->defaultCoordinates(4.1749, 73.5079)
    ->mapHeight(500);

PublishStatusSelect (Form Component)

A dropdown for content publishing status.

use Athphane\FilamentSupport\Forms\Components\PublishStatusSelect;

PublishStatusSelect::make('status');

SpatieMediaLibraryFileUpload (Form Component)

Enhanced file upload with automatic disk configuration.

use Athphane\FilamentSupport\Forms\Components\SpatieMediaLibraryFileUpload;

SpatieMediaLibraryFileUpload::make('attachment');

CoordinateMap (Infolist Component)

Read-only coordinate map display.

use Athphane\FilamentSupport\Infolists\Components\CoordinateMap;

CoordinateMap::make('coordinates');

Enums

PublishStatuses

Enum for content publishing status with Filament integration.

use Athphane\FilamentSupport\Enums\PublishStatuses;

// Options: DRAFT, PENDING, PUBLISHED, REJECTED
// Includes color, icon, and label methods for Filament

Traits

FilamentAdminUrls

Generate admin URLs for model records.

use Athphane\FilamentSupport\Traits\FilamentAdminUrls;

class Post extends Model
{
    use FilamentAdminUrls;

    // Disable admin URL generation if needed
    public function disableAdminUrlGeneration(): bool
    {
        return true;
    }
}

// Usage
$adminUrl = $post->getAdminUrl('edit');

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.