arguv / crud-api-bundle
Symfony的CRUD API包
dev-master
2020-06-28 13:09 UTC
Requires
- php: >=5.6
- doctrine/doctrine-bundle: ^1.6
- doctrine/orm: ^2.5
- symfony/framework-bundle: ^3.4
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
将包包含在您的AppKernel中
public function registerBundles() { $bundles = [ ... new Arguv\CrudApiBundle\CrudApiBundle(),
路由
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." } ]