wexample/symfony-api

A simple syntax to expose API in Symfony

0.1.65 2024-03-16 08:18 UTC

README

Pipeline status

Install

  • Note that the src/Api/Controller directory will be accessible as service.

Create API Controller directory

Create a new directory in src/Api/Controller/.

Update routing.yaml

Add the folder to your routes.yaml for loading routes.

api_controllers:
    resource: '../src/Api/Controller/'
    type: annotation

Usage

Create a controller extending the AbstractApiController class.