Last active
August 29, 2020 20:49
-
-
Save tamert/faab2c51b0fd839738b3fe48aaed8f2d to your computer and use it in GitHub Desktop.
News.php
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 | |
// src/Entity/News.php | |
namespace App\Entity; | |
use ApiPlatform\Core\Annotation\ApiResource; | |
use Symfony\Component\Serializer\Annotation\Groups; | |
/** | |
* @ApiResource | |
*/ | |
class News | |
{ | |
/** | |
* @ORM\Column(type="string", length=255, nullable=false) | |
* @Groups({ | |
* "news.list", | |
* "news.detail", | |
* "news.create" | |
* }) | |
*/ | |
private $status; | |
//... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment