A lightweight, declarative API builder for Laravel with API versioning, standalone actions, frontend SDK, and zero boilerplate.
Modified version of Laravel Query Gate
- Standalone Actions: Create model-free endpoints for custom logic.
- Rate Limiting: Built-in support for rate limiting on API endpoints.
- Swagger UI Fix: Fixed Swagger UI
| Feature | Query Gate | Laravel Orion |
|---|---|---|
| API Versioning | ✅ Built-in (Header-based) | ❌ |
| Standalone Actions | ✅ Model-free endpoints | ❌ |
| Open API | ✅ | ❌ |
| Laravel 10+ | ✅ | ❌ |
| Zero Config | ✅ |
use BehindSolution\LaravelQueryGate\Traits\HasQueryGate;
class User extends Model
{
use HasQueryGate;
public static function queryGate(): QueryGate
{
return QueryGate::make()
->filters(['name' => 'string', 'email' => 'email'])
->allowedFilters(['name' => ['like'], 'email' => ['eq']])
->sorts(['name', 'created_at']);
}
}# That's it! Your API is ready:
GET /query/users?filter[name][like]=John&sort=-created_atContributions are welcome! Please see CONTRIBUTING.md for details.
MIT