-
-
Notifications
You must be signed in to change notification settings - Fork 960
Closed
Labels
Milestone
Description
Thank you again for your great work !
It would be easier to add a filter in the entity with annotations instead of adding a service.
For example :
<?php
// src/AppBundle/Entity/Offer.php
namespace AppBundle\Entity;
use ApiPlatform\Core\Annotation\ApiResource;
use ApiPlatform\Core\Annotation\ApiFilter; // for example
/**
* @ApiResource()
*/
class Offer
{
/**
* @ApiFilter('type="search_filter", precision="exact")
*/
private $id;
/**
* @ApiFilter('type="date_filter")
*/
private $date;
...
}The goal here is to simplify the use of filters with Api-Platform, and I think it's important because the great success of Api-Platform is it's simplicity.
Reactions are currently unavailable