arguv/crud-api-bundle

Symfony bundle for CRUD API

dev-master 2020-06-28 13:09 UTC

This package is auto-updated.

Last update: 2024-09-10 15:46:59 UTC


README

Composer

composer require arguv/crud-api-bundle:dev-master

AppKernel

Include the bundle in your AppKernel

public function registerBundles()
{
    $bundles = [
        ...
        new Arguv\CrudApiBundle\CrudApiBundle(),

Routing

arguv_crud_api:
    resource: '@CrudApiBundle/Controller/'
    type:     annotation

Doctrine

php bin/console doctrine:schema:update --force

CRUD

GET   /arguv/list
GET   /arguv/list/{id}
POST  /arguv/create
POST  /arguv/update/{id}
POST  /arguv/delete/{id}

JSON

[
   {
      "name": "Smith",
      "description": "Willard Carroll Smith Jr. is an American actor and rapper."
   }
]