Easy request validation and route generation from open API specifications (for Laravel)

Installs: 10 777

Dependents: 0

Suggesters: 0

Security: 0

Stars: 11

Watchers: 6

Forks: 2

Open Issues: 1

pkg:composer/litalico-engineering/eg-r2

1.4.0 2026-02-06 00:36 UTC

This package is auto-updated.

Last update: 2026-02-06 00:36:56 UTC


README

test passsed

Easy request validation and route generation from open API specifications (for Laravel)

eg-r2 means eg in the sense that it Easy(eg) the two R(r2)s Request validation and Routing generation.

Installation

  1. composer install
    composer require litalico-engineering/eg-r2
  2. vendor publish
    php artisan vendor:publish --provider="Litalico\EgR2\Providers\GenerateRouteServiceProvider"

Usage

  1. Add swagger-php attributes to the classes (Controller and FormRequest) corresponding to each API to create an OpenAPI document.
    see. https://zircote.github.io/swagger-php/guide/attributes.html

Important

No need to define routing for Controller methods

  1. Configure the config/eg-r2.php
    Describe the namespace of the Controller that describes the OpenAPI Attribute
  2. Generate Route Files
    php artisan eg-r2:generate-route