PHPackages                             miguilim/filament-auto-panel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Admin Panels](/categories/admin)
4. /
5. miguilim/filament-auto-panel

ActiveLibrary[Admin Panels](/categories/admin)

miguilim/filament-auto-panel
============================

Construct your Filament panel Resources and Relation Managers at execution time like magic.

4.0.0(3mo ago)4116.7k↓36.7%6[7 issues](https://github.com/miguilimzero/filament-auto-panel/issues)1MITPHPPHP ^8.2

Since Jun 13Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/miguilimzero/filament-auto-panel)[ Packagist](https://packagist.org/packages/miguilim/filament-auto-panel)[ RSS](/packages/miguilim-filament-auto-panel/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (85)Used By (1)

[![Filament Auto Panel art](./art/banner.png)](./art/banner.png)

Filament Auto Panel
===================

[](#filament-auto-panel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/9bca0f1bb9bb95da2a970af63800a712c43d4da9a1cb88079b9c08de55cf0e59/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d696775696c696d2f66696c616d656e742d6175746f2d70616e656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/miguilim/filament-auto-panel)[![Total Downloads](https://camo.githubusercontent.com/fbea2c80908725ae682d77c09788d02a4b51fd5daa12f92dfcc73826db32aa0d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d696775696c696d2f66696c616d656e742d6175746f2d70616e656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/miguilim/filament-auto-panel)

Construct your Filament panel Resources and Relation Managers at execution time like magic. This package provide custom Resources and Relation Managers classes that mounts it table, create, view and edit pages at execution time by scanning the database current table schema while still giving you the freedom to create actions, widgets and various customizations to your panel.

Warning

This package is not compatible with the `filament:optimize` command.

Important

This package is intended for admin panels, similar to how Laravel Nova works + everything auto-generated. You can also think it as a database management tool. If you feels you need a more customized resource workflow, re-consider to not use this package.

Contents
--------

[](#contents)

- [Installation](#installation)
- [Usage](#usage)
    - [Soft Deletes](#soft-deletes)
    - [Primary Key](#primary-key)
    - [Relationship Linking](#relationship-linking)
    - [Default Pages](#default-pages)
    - [Intrusive Mode](#intrusive-mode)
    - [Default Actions](#default-actions)
    - [Read-Only Mode](#read-only-mode)
    - [Default Sorting](#default-sorting)
- [Auto Resource](#auto-resource)
- [Auto Relation Manager](#auto-relation-manager)
- [Auto Action](#auto-action)
- [Enum Dictionary](#enum-dictionary)
- [Visible Columns](#visible-columns)
- [Searchable Columns](#searchable-columns)
- [Overwrite Columns](#overwrite-columns)
- [Appending Columns](#appending-columns)
- [Widgets](#widgets)
- [Extra Pages](#extra-pages)
- [License](#license)

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require miguilim/filament-auto-panel
```

Usage
-----

[](#usage)

Before getting started with the package, you must know some behaviors that the table schema reader have. The package takes into consideration your actual table schema in the database and not your migration file. However, it is extremely important to use the correct fields in the migration in order to generate the correct columns.

An example of that is when you use the `boolean()` column method, Laravel will generate a `tinyint(1)` table column. This specific column type and length will be used by Filament Auto Panel to detect its a boolean column. If you use the `tinyInteger()`method, it will generate a `tinyint(4)` table column, and therefore will be identified as a numeric column, even if in its context it is being used as a boolean.

Note

You can overwrite this auto-detection behavior by setting the cast for the column in your model class.

#### Soft Deletes

[](#soft-deletes)

The package detects if the table has soft deletes or not by checking if it has the `SoftDeletes` trait, by checking if `getDeletedAtColumn` method exists in the model. If soft deletes is detected, it will append the `TrashedFilter` to the table filters.

#### Primary Key

[](#primary-key)

Filament Auto Panel tries to detect the primary key by calling the `getKeyName()` method from the resource / relation manager model. The primary key is searchable by default and it will also be copyable in table and infolist view.

#### Relationship Linking

[](#relationship-linking)

The package tries to link any columns that ends with `_id` with a belongsTo relationship. It sets a searchable `Select` for create/edit actions, and an URL linking to the respective resource in table and infolists (if the resource exists).

#### Default Pages

[](#default-pages)

By default, the Auto Resource have a list and view pages. The create and edit record is available as a modal action in the list and view pages respectively.

#### Intrusive Mode

[](#intrusive-mode)

Auto Resources and Auto Relation Managers have the intrusive mode by default. When this mode is activated, the create and edit actions will not respect the `$fillable` and `$hidden` model attributes. If you would like to disable this behavior, you can set `protected static bool $intrusive = false;` in your resource or relation manager class.

#### Default Actions

[](#default-actions)

By default, Auto Resource appends the following default actions:

- Bulk Actions: `DeleteBulkAction or RestoreBulkAction, ForceDeleteBulkAction`
- Table Actions: `ViewAction or RestoreAction`
- List Page Actions: `CreateAction`
- View Page Actions: `EditAction, DeleteAction or RestoreAction, ForceDeleteAction`

and Auto Relation Manager appends the following default actions:

- Bulk Actions: `DeleteBulkAction or RestoreBulkAction, ForceDeleteBulkAction`
- Table Actions: `ViewAction, EditAction or RestoreAction`
- Header Actions: `CreateAction`

#### Read-Only Mode

[](#read-only-mode)

Auto Resources and Auto Relation Managers can be read-only by setting `protected static bool $readOnly = true;` in your resource or relation manager class. With this mode, all the default actions (with the exception of the `ViewAction`) will be disabled.

If you want to re-add the create or edit actions with ease, you use the following auto action classes:

- `\Miguilim\FilamentAutoPanel\Filament\Actions\AutoCreateAction::make()`
- `\Miguilim\FilamentAutoPanel\Filament\Actions\AutoEditAction::make()`

For the other actions, such as `DeleteAction`, `RestoreAction`, `ForceDeleteAction`, and bulk equivalents, you will need to create your own auto actions and re-implement them.

#### Default Sorting

[](#default-sorting)

By default, the Auto Resource and Auto Relation Manager tries to set the table default sort for the following columns, in priority order respectively: `primary key (only if incremented)`, `created_at (if exists)`, `updated_at (if exists)`.

Note

You can customize the defaultSort() of your table (and any other method) by extending the `table(Table $table)` and use `parent::table($table)->defaultSort(...)`.

Auto Resource
-------------

[](#auto-resource)

You can get started by creating your first Auto Resource using the following command:

```
php artisan make:filament-auto-resource
```

This command creates the Auto Resource class for you, just as the default filament command. However, it uses the `AutoResource` class instead. You don't need to list anything now, **you can just access the resource page and see the magic!**

Auto Relation Manager
---------------------

[](#auto-relation-manager)

Auto Relation Manager construct a table containing the all relationship model columns, excluding the related id or morph. You don't need to generate a relation manager file as you can use the `makeFromResource` method from `RelationManagerMounter` helper class:

```
// UserResource.php
use Miguilim\FilamentAutoPanel\Mounters\RelationManagerMounter;

public static function getRelations(): array
{
    return [
        RelationManagerMounter::makeFromResource(
            resource: UserBanResource::class, // Auto Resource
            relation: 'userBans',
        ),
    ];
}
```

Note

Optional parameters: `associateAttachActions`.

Or if you don't have a resource for your relation manager, you can use the `makeStandalone` method:

```
// UserResource.php
use Miguilim\FilamentAutoPanel\Mounters\RelationManagerMounter;

public static function getRelations(): array
{
    return [
        RelationManagerMounter::makeStandalone(
            relation: 'userBans',
            visibleColumns: ['reason', 'created_at'],
        ),
    ];
}
```

Note

Optional parameters: `searchableColumns`, `enumDictionary`, `recordTitleAttribute`, `associateAttachActions`, `intrusive`, `readOnly`.

However, if you need a more customized relation manager, you can create a file with the following command:

```
php artisan make:filament-auto-relation-manager
```

This command creates the Auto Relation Manager for you and you must list it in the `getRelations()` method of your resource.

Auto Action
-----------

[](#auto-action)

The Auto Resource and Auto Relation Manager provides a `getActions()` method, however you cannot use the default Filament action on it.

Instead, you must use the `AutoAction` class. This action type have same methods as Filament Actions, however it provide new methods to set where the action will be shown. This is needed since there is only this array for all resource action positions.

The resource `action` closure always receive a collection of models. See how it works in the example below:

```
use Miguilim\FilamentAutoPanel\AutoAction;
use Illuminate\Database\Eloquent\Collection;

public static function getActions(): array
{
    return [
        AutoAction::make('refund')
            ->label('Refund')
            ->icon('heroicon-o-arrow-path')
            ->color('danger')
            ->action(fn (Collection $records) => $records->each->refund())
            ->showOnTable()
            ->showOnViewPage(),
    ];
}
```

Note

By default the auto action are not shown anywhere, so you must set at least one of the following methods: `showOnTable()`, `showOnBulkAction()`, `showOnViewPage()` or `showOnListPage()`.

Enum Dictionary
---------------

[](#enum-dictionary)

Enum dictionary is a feature available to help you formatting a value from a column for your resource. This feature sets a `badge()` in table and infolist, and use a `Select` in the form with the values you set. You can use it in the following way:

```
protected static array $enumDictionary = [
    'type' => [
        0 => 'Default',
        1 => 'Administrator',
    ]
];
```

You may customize the badge colors with the following syntax:

```
protected static array $enumDictionary = [
    'type' => [
        0 => ['Default', 'blue'],
        1 => ['Administrator', 'red'],
    ]
];
```

If you need to generate the enum dictionary dynamically, you can override the `enumDictionary` method:

```
protected static function getEnumDictionary(): array
{
    return [
        // ...
    ];
}
```

Visible Columns
---------------

[](#visible-columns)

By default all columns are shown in the Auto Resource or Auto Relation Manager table. You can customize the columns visibility using:

```
protected static array $visibleColumns = [
    'name', 'email', 'created_at'
];
```

This feature only sets the column default visibility in the top-right menu of your table. You can enable/disable any column visibility at any time using the panel.

Note

You cannot customize form or infolist columns visibility.

Searchable Columns
------------------

[](#searchable-columns)

You can set searchable columns for your Auto Resource or Auto Relation Manager using:

```
protected static array $searchableColumns = [
    'name'  => 'global',
    'email' => 'global',
];
```

You have the following searchable options to use: `global`, `individual` or `both`.

Overwrite Columns
-----------------

[](#overwrite-columns)

Sometimes you may want to customize the resource columns entirely, you can overwrite the table column, form field or infolist entry with the `getColumnsOverwrite` method:

```
use Filament\Tables\Columns\ImageColumn;

public static function getColumnsOverwrite(): array
{
    return [
        'table' => [
            ImageColumn::make('profile_photo_url')
                ->label('Profile Photo')
        ],
        'form' => [
            //
        ],
        'infolist' => [
            //
        ],
    ];
}
```

Note

You cannot append new columns using this method, only overwrite detected columns. The `make()` parameter name must be the same as the column name in the database.

Appending Columns
-----------------

[](#appending-columns)

Even though the package does not support appending columns natively, you can easily do that by extending the parent method, keeping the generated content, and merging with your custom columns.

### Table

[](#table)

```
use Filament\Tables\Table;

public static function table(Table $table): Table
{
    $generatedTable = parent::table($table);

    return $generatedTable
        ->columns([
            // Columns...
            ...$generatedTable->getColumns(),
            // Columns...
        ]);
}
```

### Form

[](#form)

```
use Filament\Schemas\Schema;

public static function form(Schema $schema): Schema
{
    $generatedSchema = parent::form($schema);

    return $generatedSchema
        ->schema([
            // Columns...
            ...$generatedSchema->getComponents(),
            // Columns...
        ]);
}
```

### Infolist

[](#infolist)

```
use Filament\Schemas\Schema;

public static function infolist(Schema $schema): Schema
{
    $generatedSchema = parent::infolist($schema);

    return $generatedSchema
        ->schema([
            // Columns here...
            ...$generatedSchema->getComponents(),
            // Columns here...
        ]);
}
```

Note

If you want to add columns to the end of the table in a simpler way, you can just use `parent::table($table)->pushColumns([/* Columns */])` without the need to merge the generated columns.

Note

If you want to add columns to the middle of the generated columns, you can slice the generated columns array. Example: `...array_slice($generatedColumns, 0, 2), /* Columns */, ...array_slice($generatedColumns, 2)`.

Widgets
-------

[](#widgets)

You can set widgets to the `list` and `view` pages for your Auto Resource independently in the following way:

```
public static function getHeaderWidgets(): array
{
    return [
        'list' => [
            MyCoolStatsWidget::class,
        ],
        'view' => [
            //
        ],
    ];
}

public static function getFooterWidgets(): array
{
    return [
        'list' => [
            //
        ],
        'view' => [
            //
        ],
    ];
}
```

Extra Pages
-----------

[](#extra-pages)

You can append extra pages to your Auto Resource using the `getExtraPages` method:

```
public static function getExtraPages(): array
{
    return [
        MyCustomResourcePage::route('/custom-path'),
    ];
}
```

License
-------

[](#license)

Filament Auto Panel is open-sourced software licensed under the [MIT license](LICENSE).

###  Health Score

55

—

FairBetter than 98% of packages

Maintenance80

Actively maintained with recent releases

Popularity38

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~11 days

Recently: every ~26 days

Total

84

Last Release

108d ago

Major Versions

0.3.0 → 1.0.02023-08-28

1.4.4 → 2.0.02024-03-22

2.0.1 → 3.0.02025-08-12

3.5.2 → 4.0.02026-01-30

PHP version history (2 changes)0.1.0PHP ^8.0

3.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/fb8b11dada0ea657454bea6187e33f6937364c94f75f198751a7f788438510a8?d=identicon)[miguilim](/maintainers/miguilim)

---

Top Contributors

[![miguilimzero](https://avatars.githubusercontent.com/u/35383529?v=4)](https://github.com/miguilimzero "miguilimzero (223 commits)")

### Embed Badge

![Health badge](/badges/miguilim-filament-auto-panel/health.svg)

```
[![Health](https://phpackages.com/badges/miguilim-filament-auto-panel/health.svg)](https://phpackages.com/packages/miguilim-filament-auto-panel)
```

###  Alternatives

[filament/spatie-laravel-settings-plugin

Filament support for `spatie/laravel-settings`.

1092.4M73](/packages/filament-spatie-laravel-settings-plugin)[awcodes/filament-quick-create

Plugin for Filament Admin that adds a dropdown menu to the header to quickly create new items.

246177.6k7](/packages/awcodes-filament-quick-create)[ralphjsmit/laravel-filament-seo

A package to combine the power of Laravel SEO and Filament Admin.

15398.7k10](/packages/ralphjsmit-laravel-filament-seo)[geo-sot/filament-env-editor

Access .env file though Filament admin panel

2432.3k1](/packages/geo-sot-filament-env-editor)[eveseat/web

SeAT Web Interface

2723.2k135](/packages/eveseat-web)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1714.8k8](/packages/2lenet-crudit-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
