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
Filament Api Forge

Filament Api Forge Laravel Package

yusufgenc/filament-api-forge

Expose Filament Resources as REST APIs automatically—no Sanctum. Hash-based API keys with scopes, per-resource access control, rate limiting, IP restrictions, Spatie Query Builder filtering/sorting, and auto-generated OpenAPI + public Swagger docs.

View on GitHub
Deep Wiki
Context7

Automatically expose your Filament Resources as fully-featured REST APIs with authentication, documentation, rate limiting and query builder support.

Frequently asked questions about Filament Api Forge
How do I expose a Filament Resource as an API with this package?
Add the `HasApi` trait to your Filament Resource class. The package auto-discovers it and generates REST endpoints (e.g., `/filament/api/posts`) for CRUD operations. No manual route or controller setup is required.
Does this package work with Laravel Sanctum or Passport?
No, it replaces Sanctum/Passport for API auth. It uses hash-based tokens (prefixed with `forge_`) stored securely in the database. This simplifies API key management for mobile apps or third-party services.
Can I customize which CRUD methods are exposed for a resource?
Yes. In your `HasApi` resource, override the `forgeApiMethods()` method to enable or disable `index`, `store`, `show`, `update`, or `destroy`. By default, all methods are enabled.
How do I manage API keys and permissions in Filament?
API keys are managed via a dedicated Filament panel page. You can create keys, assign scopes (`read`, `write`, `delete`), and enforce IP restrictions or rate limits per resource or method.
What Laravel and Filament versions does this package support?
It requires **Laravel 10+** and **Filament 5.x**. PHP 8.2+ is mandatory due to named arguments and attributes used internally. Check the [README](https://github.com/yusufgenc34/filament-api-forge) for exact version constraints.
How does rate limiting work, and can I override defaults?
Rate limiting is hierarchical: global limits apply first, then per-resource, and finally per-method overrides. Configure these in the Filament UI. For advanced use cases, you can extend the package’s throttling logic via service providers.
Are the OpenAPI/Swagger docs interactive, and can I share them publicly?
Yes, the package auto-generates an interactive Swagger UI for API docs. You can also publish a standalone public documentation page (light/dark mode) with a single click in the Filament settings.
Can I restrict API access by IP address?
Absolutely. Use the Filament UI to whitelist IPs per resource or method with CIDR notation, wildcards, or exact matches. This is useful for internal services or known client IPs.
How do I handle complex queries like filtering, sorting, or eager loading?
The package integrates with **Spatie’s Query Builder** for dynamic filtering, sorting, field selection, and eager loading. Use query parameters like `?filter[status]=active` or `?include=comments` in your API requests.
What if I need to extend beyond REST (e.g., GraphQL or WebSockets)?
This package focuses on REST APIs for Filament Resources. For GraphQL or WebSockets, you’d need to manually create additional routes or controllers. The package doesn’t block these extensions but prioritizes REST-first simplicity.
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.
calmfox/watch-sylius
damienfern/grpc-symfony-bundle
atoolo/index-bundle
atoolo/genai-bundle
coprotoai/laravel-ticket
davidjln/llm-carbon-bundle
cryonighter/valid-request-bundle
coolms/taxonomy-bundle
coolms/field-bundle
articulate-orm/symfony
aaix/laravel-tall-architect
ephoto/akeneo-connector
emmanuelballery/eb-plantumlbundle
emielburgman/symfony-visitor-beacon
emielburgman/symfony-visit-storage
emielburgman/symfony-security-headers
emielburgman/symfony-log-viewer
emarref/xdebug-bundle
emarref/pubnub-bundle
elriseio/finance-money-bundle