Last active
November 11, 2021 17:08
-
-
Save atillay/866af0fafce99c16febd8a52785962c0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Entity; | |
use ApiPlatform\Core\Annotation\ApiResource; | |
/** | |
* @ApiResource( | |
* collectionOperations={ | |
* "post" | |
* }, | |
* itemOperations={ | |
* "put", | |
* "put_custom"={ | |
* "method"="PUT", | |
* "path"="/my-entity/{id}/custom" | |
* } | |
* } | |
* attributes={ | |
* "validation_groups"=App\Validator\ValidationGroupsGenerator::class | |
* } | |
* ) | |
*/ | |
class MyEntity { | |
// same as before | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment