Last active
September 14, 2018 08:37
-
-
Save piotrbrzezina/ceffca06d59ce9a75b0360c21850653f to your computer and use it in GitHub Desktop.
Flashcard step 3 (serialization groups)
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 | |
// ... | |
use Symfony\Component\Serializer\Annotation\Groups; | |
class Subject | |
{ | |
/** | |
* ... | |
* @Groups({"subjectList"}) | |
*/ | |
private $id; | |
/** | |
* ... | |
* @Groups({"subjectList", "subjectCreate"}) | |
*/ | |
public $name; | |
// ... | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment