encoredigitalgroup / filament-helpers
A collection of pre-built Filament components with common configurations that we find ourselves frequently using.
Installs: 7 093
Dependents: 0
Suggesters: 0
Security: 0
Stars: 7
Watchers: 0
Forks: 0
Open Issues: 0
Requires
- encoredigitalgroup/stdlib: ^2.0
- filament/filament: ^4.0.0-beta24
- illuminate/support: ^11|^12
- livewire/livewire: ^3.6.4
- phpgenesis/common: ^1.0
Requires (Dev)
- filament/upgrade: ^4.0
- phpgenesis/devutilities: ^1.0
- phpstan/phpstan: ^2.0
- rector/rector: ^2.0
- tightenco/duster: ^2.7 || ^3.0
- dev-main
- v4.0.0-rc1
- v3.3.0
- v3.2.1
- v3.2.0
- v3.1.1
- v3.1.0
- v3.0.0
- v2.5.0
- v2.4.3
- v2.4.2
- v2.4.1
- v2.4.0
- v2.3.1
- v2.3.0
- v2.2.0
- v2.1.1
- v2.1.0
- v2.0.8
- v2.0.7
- v2.0.6
- v2.0.5
- v2.0.4
- v2.0.3
- v2.0.2
- v2.0.1
- 1.0
- dev-dependabot/composer/filament/filament-4.0.0
- dev-dependabot/composer/filament/upgrade-4.0.0
- dev-dependabot/composer/rector/rector-2.1.3
- dev-release/v3.x
This package is auto-updated.
Last update: 2025-08-13 17:29:45 UTC
README
The Encore Digital Group Filament Helpers package is a collection of pre-built Filament components that we find ourselves frequently using. Rather than constantly rebuilding the same component across multiple resources and projects, we centralized these common configurations into a single shared package. Each helper class method returns a pre-configured Filament component that can be used in your resource classes. Because the helper classes return a Filament component, you can chain additional method calls to further configure the component as needed.
Installation
To install the Filament Helpers package, you can use Composer:
composer require encoredigitalgroup/filament-helpers
Preparing for Filament v4
Preliminary Filament v4 support has been added to this package on the main branch. You can opt-in to using v4 by setting the package version to ^4.0.0-rc1
.
Usage of release candidates in production code is discouraged.
Upgrading to v4
- Return types have been updated to use the new
Filament\Schemas
namespace. - Class parameters named
$fieldName
have been renamed to$field
for consistency with the rest of the package. If you are not using named parameters in your code, then there is nothing for you to do.
Upgrading to v3
The EncoreDigitalGroup\Filament\Helpers\Forms\GroupSection
class had the following modifications:
-
The
make()
method now only has one parameter:$schema
. No changes are required for use of this parameter.- The
$render
parameter has been removed. Use ofmake($schema)
automatically renders the component. - The
$fluent
parameter has been removed. UseGroupSection::fluent($schema)
instead. - The
$innerColumns
parameter has been removed. UseGroupSection::fluent($schema)->innerColumns($int)
instead. - The
$outerColumns
parameter has been removed. UseGroupSection::fluent($schema)->outerColumns($int)
instead. - The
$innerColumnSpan
parameter has been removed. UseGroupSection::fluent($schema)->innerColumnSpan($int)
instead. - The
$outerColumnSpan
parameter has been removed. UseGroupSection::fluent($schema)->outerColumnSpan($int)
instead.
- The
-
The
fluent()
method has been added:- As the name suggests, this method does not automatically render the component. You can make your adjustments using the
provided methods. Once you are finished making adjustments, you can call
render()
to render the component.
- As the name suggests, this method does not automatically render the component. You can make your adjustments using the
provided methods. Once you are finished making adjustments, you can call
Upgrading to v2
The only change between v1 and v2 is a slight namespace change. v1 used EncoreDigitalGroup\FilamentHelpers
. v2 now uses EncoreDigitalGroup\Filament\Helpers
. This
change was made to make this package consistent with other packages Encore Digital Group has. A simple find and replace will work for this upgrade as there are no other
changes, breaking or otherwise, in this release.
Usage
DateTimePicker::make('start_date'); HourSelector::make('start_time', 'Start Time'); NumericScale::make('rating', 'Rating'); PercentScale::make('discount', 'Discount'); TextInput::make('first_name', 'First Name')
DateTimePicker
This helper takes two arguments:
- field: the model attribute to bind the field to.
- required: is the field required? (default: true)
HourSelector
This helper takes two arguments:
- field: the model attribute to bind the field to.
- label: the field label. (default: null)
NumericScale
This helper takes two arguments:
- field: the model attribute to bind the field to.
- label: the field label. (default: null)
PercentScale
This helper takes two arguments:
- field: the model attribute to bind the field to.
- label: the field label. (default: null)
TextInput
This helper takes two arguments:
- field: the model attribute to bind the field to.
- label: the field label. (default: null)