A lightweight Laravel package designed to make building powerful APIs easier and faster.
  • PHP 99.6%
  • Blade 0.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-03-21 18:19:48 +01:00
.github/workflows feat: add standalone actions and rate limiting support 2026-01-25 12:28:49 +01:00
config feat: add standalone actions and rate limiting support 2026-01-25 12:28:49 +01:00
docs Add route parameter to standalone actions 2026-03-21 18:17:37 +01:00
resources/views feat: add standalone actions and rate limiting support 2026-01-25 12:28:49 +01:00
src Add route parameter to standalone actions 2026-03-21 18:17:37 +01:00
stubs feat: custom actions 2026-01-06 00:35:22 -04:00
tests Add route parameter to standalone actions 2026-03-21 18:17:37 +01:00
.gitignore feat: add tests 2025-12-27 10:49:16 -04:00
.gitlab-ci.yml Fix gitlab ci 2026-03-21 18:19:48 +01:00
artisan feat: add tests 2025-12-27 10:49:16 -04:00
composer.json Add Laravel 13 support 2026-03-18 19:25:58 +01:00
composer.lock Add route parameter to standalone actions 2026-03-21 18:17:37 +01:00
CONTRIBUTING.md feat: doc 2025-12-27 23:55:08 -04:00
doc.md Add route parameter to standalone actions 2026-03-21 18:17:37 +01:00
phpunit.xml feat: add tests 2025-12-27 10:49:16 -04:00
README.md Add route parameter to standalone actions 2026-03-21 18:17:37 +01:00

Laravel Query Gate

Latest Version Tests Total Downloads License

A lightweight, declarative API builder for Laravel with API versioning, standalone actions, frontend SDK, and zero boilerplate.

Modified version of Laravel Query Gate

Added Features

  • 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

Why Query Gate?

Feature Query Gate Laravel Orion
API Versioning Built-in (Header-based)
Standalone Actions Model-free endpoints
Open API
Laravel 10+
Zero Config ⚠️

Quick Start

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_at

Ecosystem

🤝 Contributing

Contributions are welcome! Please see CONTRIBUTING.md for details.

📄 License

MIT