rradutzu/zf-apigility-doctrine-bulk

There is no license information available for the latest version (1.5.0) of this package.

Apigility Doctrine module which enables POST-ing collections

1.5.0 2020-10-26 12:58 UTC

This package is auto-updated.

Last update: 2024-04-26 20:35:58 UTC


README

Installation

Installation of this module uses composer. For composer documentation, please refer to getcomposer.org.

$ composer require rradutzu/zf-apigility-doctrine-bulk

Usage

Modify your resource from

namespace Api\V1\Rest\ApiExample;

use ZF\Apigility\Doctrine\Server\Resource\DoctrineResource;

class ApiExampleResource extends DoctrineResource

to

namespace Api\V1\Rest\ApiExample;

use ZF\Apigility\Doctrine\Bulk\Server\Resource\DoctrineBulkResource;

class ApiExampleResource extends DoctrineBulkResource

The POST operation will now accept a collection of entities as well as a single entity at a time.