Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Custom Fields Laravel Package

relaticle/custom-fields

Laravel/Filament plugin to add dynamic custom fields to any Eloquent model without migrations. Includes 20+ field types, conditional visibility, tenant isolation, admin UI integration (forms/tables/infolists), CSV import/export, optional encryption, and extensible field types.

View on GitHub
Deep Wiki
Context7

title: Quickstart description: Get Custom Fields v3 working in your Filament project in under 5 minutes navigation: icon: i-lucide-rocket

Register the Plugin

Add the Custom Fields plugin to your panel:

use Relaticle\CustomFields\CustomFieldsPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugins([
            CustomFieldsPlugin::make(),
        ]);
}

Prepare Your Model

Implement the interface and use the trait:

use Illuminate\Database\Eloquent\Model;
use Relaticle\CustomFields\Models\Concerns\UsesCustomFields;
use Relaticle\CustomFields\Models\Contracts\HasCustomFields;

class Customer extends Model implements HasCustomFields
{
    use UsesCustomFields;
}

Add to Your Form

Add custom fields to your resource form:

use Relaticle\CustomFields\Facades\CustomFields;

public static function form(Schema $schema): Schema
{
    return $schema
        ->components([
            // Your existing fields...
            Forms\Components\TextInput::make('name'),
            Forms\Components\TextInput::make('email'),

            // Add Custom Fields
            CustomFields::form()->build()->columnSpanFull()
        ]);
}

Add to Your Table

Display custom fields in your table:

use Relaticle\CustomFields\Facades\CustomFields;

public static function table(Table $table): Table
{
    return $table
        ->columns([
            // Your existing columns...
            Tables\Columns\TextColumn::make('name'),
            Tables\Columns\TextColumn::make('email'),

            // Add custom field columns
            ...CustomFields::table()
                ->forModel($table->getModel())
                ->columns(),
        ])
        ->filters([
            // Add custom field filters
            ...CustomFields::table()
                ->forModel($table->getModel())
                ->filters(),
        ]);
}

Add to Info Lists

For view pages, include custom fields:

public static function infolist(Schema $schema): Schema
{
    return $schema
        ->components([
            // Your existing components...

            // Add Custom Fields
            CustomFields::infolist()
                ->forSchema($schema)
                ->build(),
        ]);
}

That's It!

Your resource now has dynamic custom fields! Users can:

  • Add new fields through the admin panel
  • Fill out custom fields in forms
  • View and filter by custom fields in tables
  • See custom field values in detail views
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
emuniq/filament-browser-notifications
syriable/filament-translator
hungnm28/livewire-form
wenprise/eloquent
crudly/encrypted
fadion/bouncy
cuci/prototurk-sdk
gos/pubsub-router-bundle
cuci/prototurk-sdk-symfony
clementtalleu/easyadmin-markdown-bundle
codeflextech/permission-manager
karnoweb/livewire-datepicker
sayedenam/sayed-dashboard
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui