Skip to content

Commit 1de9e32

Browse files
committed
declare superheroes entity to be an API resource
1 parent 4823c6e commit 1de9e32

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Entity/superheroes.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@
55
use Doctrine\ORM\Mapping as ORM;
66
use Doctrine\Common\Collections\ArrayCollection;
77
use Symfony\Component\Validator\Constraints as Assert;
8+
use ApiPlatform\Core\Annotation\ApiResource;
89

910
/**
1011
* @ORM\Entity
1112
* @ORM\HasLifecycleCallbacks()
1213
* @ORM\Table(name="superheroes")
14+
* @ApiResource()
1315
*/
1416
class superheroes
1517
{

0 commit comments

Comments
 (0)