Resource API Generator by Fady Mondy
CommunityGenerate APIs from your Filament resource using single line of code
Author:
Fady Mondy
Package health
Automated checks of this plugin's Composer package
15 checks
- Failed: GitHub Actions pinned to SHA — View details on Plumb
- Skipped: GitLab CI includes pinned to SHA
- Passed: Open security advisories
- Passed: Dependabot PR responsiveness — No stale Dependabot PRs.
- Skipped: Renovate MR responsiveness
- Passed: Dependabot or Renovate configured
-
Failed:
Dependency update cooldown configured
—
No cooldown configured in
.github/dependabot.yml. View details on Plumb - Passed: Provides a security policy
- Passed: Abandoned or archived — No consulted source marks the package abandoned (packagist, github).
- Passed: Commit and release recency — Active: last commit 0 days ago; last release 0 days ago.
-
Passed:
composer.lock not committed by library
—
composer.lockis absent from the released dist archive. - Warning: Dist archive is lean
-
Passed:
Current Laravel version supported
— Package dependencies resolve together with current Laravel
13.0. -
Passed:
Current PHP version supported
— Constraint
^8.2supports current PHP8.5. - Skipped: Current Symfony version supported
filament/
namespace. Review the source and install at your own risk. Found
malware or an unresolved security issue the author won't
address?
Report it
.
Documentation
- Version Compatibility
- Installation
- Screenshots
- Usage
- Customize your API
- Publish Assets
- Testing
- Other Filament Packages

Generate JSON APIs from your Filament resources with a single line of code.
#Version Compatibility
| Plugin | Filament | Laravel | PHP |
|---|---|---|---|
| 1.x | 3.x | 10.x / 11.x | 8.1+ |
| 5.x | 5.x | 12.x / 13.x | 8.2+ |
#Installation
The APIs list page keeps the generated endpoints in an in-memory SQLite table, so the pdo_sqlite PHP extension is required.
composer require tomatophp/filament-api
php artisan filament-api:install
To list the generated endpoints in your panel, register the plugin in /app/Providers/Filament/AdminPanelProvider.php:
->plugin(\TomatoPHP\FilamentApi\FilamentAPIPlugin::make())
The endpoints use the auth:sanctum middleware by default. Install Laravel Sanctum (php artisan install:api) or change default_middleware in config/filament-api.php.
#Screenshots

#Usage
Add the trait to your resource pages:
use Filament\Resources\Pages\ListRecords;
use TomatoPHP\FilamentApi\Traits\InteractWithAPI;
class ListPosts extends ListRecords
{
use InteractWithAPI;
}
That's it, the API is available under /api/{slug}. Each page type adds its endpoints:
| Page | Endpoints |
|---|---|
ListRecords |
GET /api/{slug} (list, ?search= and ?page=), DELETE /api/{slug}/{id} |
ManageRecords |
all five endpoints |
CreateRecord |
POST /api/{slug} |
EditRecord |
PUT /api/{slug}/{id} |
ViewRecord |
GET /api/{slug}/{id} |
- The list returns the visible columns of the resource table, searches its searchable columns and uses its default sort.
Relationship columns such as
author.nameare eager loaded and searchable. - Create and update validate the request with the rules of every field of the resource form (fields inside sections, tabs and grids included) and save only the form fields.
- Queries go through the resource
getEloquentQuery(), so scopes, soft deletes and tenancy filters apply. - When the model has a policy, the
viewAny,view,create,updateanddeleteabilities are checked for the API user. - The routes point at a controller, so
php artisan route:cacheworks.
Responses look like {"status": "success", "message": "OK", "data": ...}; errors return {"status": "error", "message": "..."}
with the status code (404, 403, and 422 with an errors object for validation).
#Customize your API
Override these methods on the page:
// Return a JSON resource from the list, show, store and update endpoints
public static function getFilamentAPIResource(): ?string
{
return PostResource::class;
}
// The middleware of the endpoints
public static function getFilamentAPIMiddleware(): array
{
return ['auth:sanctum'];
}
// The endpoint slug, defaults to the resource slug
public static function getFilamentAPISlug(): ?string
{
return 'articles';
}
// The form used to validate and save the store and update endpoints
public static function getFilamentAPIForm(Schema $schema): Schema
{
return static::getResource()::form($schema);
}
// The table used to shape the list endpoint
public static function getFilamentAPITable(Table $table): Table
{
return static::getResource()::table($table);
}
#Publish Assets
php artisan vendor:publish --tag="filament-api-config"
#Testing
composer test
#Other Filament Packages
Checkout our Awesome TomatoPHP
The author
Applied AI engineer and fractional CTO from Cairo, Egypt. Creator of TomatoPHP, 50+ open-source Filament plugins for building full apps (CMS, e-commerce, accounts, invoices, SaaS panels), and of Laravilt, an admin panel framework for Laravel on Inertia.
From the same author
Menu Generator
Menu view generator using view component
Author:
Fady Mondy
Translations Manager
Manage your translation with DB and cache, you can scan an collect translation strings like `trans()` and `__()`, and translate them using UI
Author:
Fady Mondy
Meta Manager
Convert any model on your app to pluggable model using Meta and get ready to use relation manager on FilamentPHP panel
Author:
Fady Mondy
Sticky Notes
Add Sticky Notes to your dashboard with tons of options and style.
Author:
Fady Mondy
Featured Plugins
A selection of plugins curated by the Filament team
Blueprint
Filament Blueprint is a premium Laravel Boost extension that helps AI agents produce accurate, detailed implementation plans and security reports for Filament apps.
Filament
Custom Fields
Eliminate custom field migrations forever. Let your users create and manage form fields directly in Filament admin panels with 20+ built-in field types, validation, and zero database changes.
Relaticle
Advanced Tables (formerly Filter Sets)
Supercharge your tables with powerful features like user-customizable views, quick filters, multi-column sorting, advanced table searching, convenient view management, and more. Compatible with Resource Panel Tables, Relation Managers, Table Widgets, and Table Builder!
Kenneth Sese