PHPackages                             tomatophp/filament-types - 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. [Database &amp; ORM](/categories/database)
4. /
5. tomatophp/filament-types

ActiveLibrary[Database &amp; ORM](/categories/database)

tomatophp/filament-types
========================

Manage any type on your app in Database with easy to use Resource for FilamentPHP

4.0.2(7mo ago)5616.7k—5.6%2[3 PRs](https://github.com/tomatophp/filament-types/pulls)8MITPHPPHP ^8.2|^8.3|^8.4CI passing

Since Apr 11Pushed 4mo ago2 watchersCompare

[ Source](https://github.com/tomatophp/filament-types)[ Packagist](https://packagist.org/packages/tomatophp/filament-types)[ GitHub Sponsors](https://github.com/3x1io)[ RSS](/packages/tomatophp-filament-types/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (17)Versions (40)Used By (8)

[![Screenshot](https://raw.githubusercontent.com/tomatophp/filament-types/master/arts/fadymondy-tomato-types.jpg)](https://raw.githubusercontent.com/tomatophp/filament-types/master/arts/fadymondy-tomato-types.jpg)

Filament Types Manager
======================

[](#filament-types-manager)

[![Dependabot Updates](https://github.com/tomatophp/filament-types/actions/workflows/dependabot/dependabot-updates/badge.svg)](https://github.com/tomatophp/filament-types/actions/workflows/dependabot/dependabot-updates)[![PHP Code Styling](https://github.com/tomatophp/filament-types/actions/workflows/fix-php-code-styling.yml/badge.svg)](https://github.com/tomatophp/filament-types/actions/workflows/fix-php-code-styling.yml)[![Tests](https://github.com/tomatophp/filament-types/actions/workflows/tests.yml/badge.svg)](https://github.com/tomatophp/filament-types/actions/workflows/tests.yml)[![Latest Stable Version](https://camo.githubusercontent.com/cc25a98cba6c9e8a3e9eb2b0c51e4caf1a344074fe20bc8ea7c8630f10c38467/68747470733a2f2f706f7365722e707567782e6f72672f746f6d61746f7068702f66696c616d656e742d74797065732f76657273696f6e2e737667)](https://packagist.org/packages/tomatophp/filament-types)[![License](https://camo.githubusercontent.com/c17beaf98909d00a066f0639db3343e8bad1f6b22af6485a7c8f28e84fb9a577/68747470733a2f2f706f7365722e707567782e6f72672f746f6d61746f7068702f66696c616d656e742d74797065732f6c6963656e73652e737667)](https://packagist.org/packages/tomatophp/filament-types)[![Downloads](https://camo.githubusercontent.com/9d879aab31693501fe0a0ac8db217b7b28864a37be2dbc1d430fa9e0742423d1/68747470733a2f2f706f7365722e707567782e6f72672f746f6d61746f7068702f66696c616d656e742d74797065732f642f746f74616c2e737667)](https://packagist.org/packages/tomatophp/filament-types)

Manage any type on your app in Database with easy to use Resource for FilamentPHP

Screenshots
-----------

[](#screenshots)

[![Types](https://raw.githubusercontent.com/tomatophp/filament-types/master/arts/types.png)](https://raw.githubusercontent.com/tomatophp/filament-types/master/arts/types.png)[![Filters](https://raw.githubusercontent.com/tomatophp/filament-types/master/arts/filters.png)](https://raw.githubusercontent.com/tomatophp/filament-types/master/arts/filters.png)[![Type Col](https://raw.githubusercontent.com/tomatophp/filament-types/master/arts/type-col.png)](https://raw.githubusercontent.com/tomatophp/filament-types/master/arts/type-col.png)[![Form](https://raw.githubusercontent.com/tomatophp/filament-types/master/arts/form.png)](https://raw.githubusercontent.com/tomatophp/filament-types/master/arts/form.png)

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

[](#installation)

```
composer require tomatophp/filament-types
```

after install your package please run this command

```
php artisan filament-types:install
```

finally register the plugin on `/app/Providers/Filament/AdminPanelProvider.php`

```
use TomatoPHP\FilamentTypes\Services\Contracts\Type;
use TomatoPHP\FilamentTypes\Services\Contracts\TypeFor;
use TomatoPHP\FilamentTypes\Services\Contracts\TypeOf;

->plugin(\TomatoPHP\FilamentTypes\FilamentTypesPlugin::make())
    ->types([
        TypeFor::make('posts')
            ->label('Posts')
            ->types([
                TypeOf::make('categories')
                    ->label('Categories')
                    ->register([
                        Type::make('news')
                            ->name('News')
                            ->icon('heroicon-o-newspaper')
                            ->color('#fefefe')
                    ])
            ])
    ])
```

Register Type using provider
----------------------------

[](#register-type-using-provider)

you can register a type from your provider using our Facade

```
use TomatoPHP\FilamentTypes\Facades\FilamentTypes;
use TomatoPHP\FilamentTypes\Services\Contracts\Type;
use TomatoPHP\FilamentTypes\Services\Contracts\TypeFor;
use TomatoPHP\FilamentTypes\Services\Contracts\TypeOf;

FilamentTypes::register([
    TypeFor::make('products')
        ->label('Product')
        ->types([
            TypeOf::make('sizes')
                ->label('Sizes')
                ->register([
                    Type::make('xl')
                        ->name('XL')
                        ->icon('heroicon-o-adjustments-horizontal')
                        ->color('warning'),
                    Type::make('sm')
                        ->name('SM')
                        ->icon('heroicon-o-adjustments-horizontal')
                        ->color('warning')
                ])
        ]),
]);
```

Config Locales
--------------

[](#config-locales)

You can change the locals within the `filament-types` config.

- Publish the config file/
- Modify the `locals` array to include the two character language code that applys to the language you wish to offer. EG:

```
'locals' = ['en'],

```

Use Type Helper
---------------

[](#use-type-helper)

you can find any type with the helper method to use it anywhere

```
type_of(
    key: 'pending',
    for: 'notes',
    type: 'groups'
);
```

it will return type model for you.

Use Type Column
---------------

[](#use-type-column)

you can use type column in your table like this

```
use TomatoPHP\FilamentTypes\Components\TypeColumn;

TypeColumn::make('type')
    ->for('users')
    ->type('status')
    ->allowDescription()
    ->searchable(),
```

Auto Caching
------------

[](#auto-caching)

on your `.env` add this

```
CACHE_STORE=array
MODEL_CACHE_STORE=array
```

supported cache stores are

```
+ Redis
+ MemCached
+ APC
+ Array
```

Use Type Base Page
------------------

[](#use-type-base-page)

you can create a page for selected type by just extand base type page

```
use TomatoPHP\FilamentTypes\Pages\BaseTypePage;

use TomatoPHP\FilamentTypes\Services\Contracts\Type;

class NotesGroups extends BaseTypePage
{
     public function getTitle(): string
    {
        return "Notes Groups";
    }

    public function getType(): string
    {
        return "groups";
    }

    public function getFor(): string
    {
        return "notes";
    }

    public function getBackUrl()
    {
        return ManageNotes::getUrl(); // TODO: Change the autogenerated stub
    }

    public function getTypes(): array
    {
        return [
            Type::make('todo')
                ->name("TODO")
                ->color('#1461e3')
                ->icon('heroicon-o-list-bullet'),
            Type::make('ideas')
                ->name("Ideas")
                ->color('#13e0da')
                ->icon('heroicon-o-sparkles'),
            Type::make('saved')
                ->name("Saved")
                ->color('#29a82e')
                ->icon('heroicon-o-arrow-down-on-square'),
        ];
    }
}
```

it will be not appear on the navigation menu by default but you can change that by just use this method

```
public static function shouldRegisterNavigation(): bool
{
    return true;
}
```

Use Type Component
------------------

[](#use-type-component)

if you like to use a type as a package we create a blade component for you to make it easy to use anywhere on your app like this

```

```

User Types Resource Hooks
-------------------------

[](#user-types-resource-hooks)

we have add a lot of hooks to make it easy to attach actions, columns, filters, etc

### Table Columns

[](#table-columns)

```
use TomatoPHP\FilamentTypes\Filament\Resources\TypeResource\Table\TypeTable;

public function boot()
{
    TypeTable::register([
        \Filament\Tables\Columns\TextColumn::make('something')
    ]);
}
```

### Table Actions

[](#table-actions)

```
use TomatoPHP\FilamentTypes\Filament\Resources\TypeResource\Table\TypeActions;

public function boot()
{
    TypeActions::register([
        \Filament\Tables\Actions\ReplicateAction::make()
    ]);
}
```

### Table Filters

[](#table-filters)

```
use TomatoPHP\FilamentTypes\Filament\Resources\TypeResource\Table\TypeFilters;

public function boot()
{
    TypeFilters::register([
        \Filament\Tables\Filters\SelectFilter::make('something')
    ]);
}
```

### Table Bulk Actions

[](#table-bulk-actions)

```
use TomatoPHP\FilamentTypes\Filament\Resources\TypeResource\Table\TypeBulkActions;

public function boot()
{
    TypeBulkActions::register([
        \Filament\Tables\BulkActions\DeleteAction::make()
    ]);
}
```

### From Components

[](#from-components)

```
use TomatoPHP\FilamentTypes\Filament\Resources\TypeResource\Form\TypeForm;

public function boot()
{
    TypeForm::register([
        \Filament\Forms\Components\TextInput::make('something')
    ]);
}
```

### Page Actions

[](#page-actions)

```
use TomatoPHP\FilamentTypes\Filament\Resources\TypeResource\Actions\ManagePageActions;

public function boot()
{
    ManagePageActions::register([
        Filament\Actions\Action::make('action')
    ]);

}
```

Publish Assets
--------------

[](#publish-assets)

you can publish config file by use this command

```
php artisan vendor:publish --tag="filament-types-config"
```

you can publish views file by use this command

```
php artisan vendor:publish --tag="filament-types-views"
```

you can publish languages file by use this command

```
php artisan vendor:publish --tag="filament-types-lang"
```

you can publish migrations file by use this command

```
php artisan vendor:publish --tag="filament-types-migrations"
```

Testing
-------

[](#testing)

if you like to run `PEST` testing just use this command

```
composer test
```

Code Style
----------

[](#code-style)

if you like to fix the code style just use this command

```
composer format
```

PHPStan
-------

[](#phpstan)

if you like to check the code by `PHPStan` just use this command

```
composer analyse
```

Other Filament Packages
-----------------------

[](#other-filament-packages)

Checkout our [Awesome TomatoPHP](https://github.com/tomatophp/awesome)

###  Health Score

54

—

FairBetter than 97% of packages

Maintenance72

Regular maintenance activity

Popularity38

Limited adoption so far

Community23

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 86.2% 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 ~16 days

Recently: every ~77 days

Total

36

Last Release

211d ago

Major Versions

v1.0.27 → v2.x-dev2024-10-29

2.0.4 → 4.0.02025-08-26

PHP version history (2 changes)v1.0.0PHP ^8.1|^8.2

2.0.4PHP ^8.2|^8.3|^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/2147eb2fca7ab5f0124d0fafd88ba2d2a5dfa3a0036fb8872d1084b7cba29366?d=identicon)[fadymondy](/maintainers/fadymondy)

---

Top Contributors

[![fadymondy](https://avatars.githubusercontent.com/u/11937812?v=4)](https://github.com/fadymondy "fadymondy (81 commits)")[![pschilly](https://avatars.githubusercontent.com/u/307222?v=4)](https://github.com/pschilly "pschilly (5 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (4 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (3 commits)")[![tansautn](https://avatars.githubusercontent.com/u/6666271?v=4)](https://github.com/tansautn "tansautn (1 commits)")

---

Tags

enumfilamentfilamentphplaravelmanage-typestype-applicationtype-servicetypesphplaraveldatabasemanagerresourcetypesfilament-pluginfilamentphp

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/tomatophp-filament-types/health.svg)

```
[![Health](https://phpackages.com/badges/tomatophp-filament-types/health.svg)](https://phpackages.com/packages/tomatophp-filament-types)
```

###  Alternatives

[tomatophp/filament-translations

Manage your translation with DB and cache, you can scan your languages tags like trans(), \_\_(), and get the string inside and translate them use UI.

6230.1k3](/packages/tomatophp-filament-translations)[tomatophp/filament-alerts

Send notification to users using notification templates and multi notification channels, it's support Filament Native Notification Service with macro, and a full integration to FCM service worker notifications

7910.8k3](/packages/tomatophp-filament-alerts)[tomatophp/filament-cms

Full CMS System with support of importing integrations and multi meta functions

11410.4k4](/packages/tomatophp-filament-cms)[tomatophp/filament-media-manager

Manage your media files using spatie media library with easy to use GUI for FilamentPHP

14543.9k3](/packages/tomatophp-filament-media-manager)[tomatophp/filament-tenancy

Tenancy multi-database integration for FilamentPHP

603.8k](/packages/tomatophp-filament-tenancy)[tomatophp/filament-locations

Database Seeds for Countries / Cities / Areas / Languages / Currancy with ready to use resources for FilamentPHP

2320.8k6](/packages/tomatophp-filament-locations)

PHPackages © 2026

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