PHPackages                             tomatophp/filament-api - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. tomatophp/filament-api

ActiveLibrary[HTTP &amp; Networking](/categories/http)

tomatophp/filament-api
======================

Generate APIs from your filament resource using single line of code

v1.0.2(1y ago)507.1k↓40.6%4[1 PRs](https://github.com/tomatophp/filament-api/pulls)1MITPHPPHP ^8.1|^8.2

Since Jun 19Pushed 1y ago2 watchersCompare

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

READMEChangelog (3)Dependencies (3)Versions (4)Used By (1)

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

Resource API Generator
======================

[](#resource-api-generator)

[![Latest Stable Version](https://camo.githubusercontent.com/be6571bdb52c6f8fbb4a0df862184e38fbba64db95038771d67a5f131f79841c/68747470733a2f2f706f7365722e707567782e6f72672f746f6d61746f7068702f66696c616d656e742d6170692f76657273696f6e2e737667)](https://packagist.org/packages/tomatophp/filament-api)[![License](https://camo.githubusercontent.com/b02456fb7a4c2faf9603660887b7803808e635cc6b02c28aa14d236ddee01421/68747470733a2f2f706f7365722e707567782e6f72672f746f6d61746f7068702f66696c616d656e742d6170692f6c6963656e73652e737667)](https://packagist.org/packages/tomatophp/filament-api)[![Downloads](https://camo.githubusercontent.com/1491354e77c0673f68b9dcf936d4a3dc38782848230a387c51165ea235ac2b4e/68747470733a2f2f706f7365722e707567782e6f72672f746f6d61746f7068702f66696c616d656e742d6170692f642f746f74616c2e737667)](https://packagist.org/packages/tomatophp/filament-api)

Generate APIs from your filament resource using single line of code

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

[](#installation)

make sure that you have SQLite3 Driver installed on your PHP config, because this package required it for caching.

```
composer require tomatophp/filament-api
```

if you want to use API Resource to list your generated APIs you can register the plugin on `/app/Providers/Filament/AdminPanelProvider.php`

```
->plugin(\TomatoPHP\FilamentApi\FilamentAPIPlugin::make())
```

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

[](#screenshots)

[![APIs Resource](https://raw.githubusercontent.com/tomatophp/filament-api/master/arts/api-resource.png)](https://raw.githubusercontent.com/tomatophp/filament-api/master/arts/api-resource.png)

Usage
-----

[](#usage)

you can generate API by add this trait to your resource pages

```
use TomatoPHP\FilamentApi\Traits\InteractWithAPI;
use \Filament\Resources\Pages\ListRecords;

class ListPosts extends ListRecords
{
    use InteractWithAPI;
}
```

and that's it you can now access your API by `/api/{slug}`

we provide 5 methods:

- GET `/api/{slug}` to list all records `support searching by use search=`
- GET `/api/{slug}/{id}` to get single record
- POST `/api/{slug}` to create new record
- PUT `/api/{slug}/{id}` to update record
- DELETE `/api/{slug}/{id}` to delete record

Custom your API
---------------

[](#custom-your-api)

you can customize your api by override this methods

```
// Use to return API JSON Resource on Index/Show/Store/Update
public static function getFilamentAPIResource(): ?string
{
    return null;
}

// Use To Custom Your Route Middleware
public static function getFilamentAPIMiddleware(): array
{
    return config('filament-api.default_middleware');
}

// Use To Change the Endpoint Slug
public static function getFilamentAPISlug(): ?string
{
    return null;
}
```

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

[](#publish-assets)

you can publish config file by use this command

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

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

[](#other-filament-packages)

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

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity35

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 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 ~48 days

Total

3

Last Release

602d ago

### 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 (8 commits)")

---

Tags

apifilament-pluginfilamentphpgeneratorresttomatophpphpapilaravelrestgeneratorfilament-pluginfilamentphptomatophp

### Embed Badge

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

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

###  Alternatives

[marcin-orlowski/laravel-api-response-builder

Helps building nice, normalized and easy to consume Laravel REST API.

837458.6k3](/packages/marcin-orlowski-laravel-api-response-builder)[givebutter/laravel-keyable

Add API keys to your Laravel models

187144.5k2](/packages/givebutter-laravel-keyable)[tomatophp/filament-cms

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

11410.4k4](/packages/tomatophp-filament-cms)

PHPackages © 2026

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