Last active
November 11, 2021 12:16
-
-
Save atillay/b9a67156d2979961ff48c0eb82ef2df8 to your computer and use it in GitHub Desktop.
This file contains 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={ | |
* "get", | |
* "post" | |
* }, | |
* itemOperations={ | |
* "get", | |
* "get_custom"={"method"="GET", "path"="/my-entity/{id}/custom"}, | |
* "put", | |
* "put_custom"={"method"="PUT", "path"="/my-entity/{id}/custom"} | |
* } | |
* ) | |
*/ | |
class MyEntity { | |
// stays identical | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment