Skip to content

Instantly share code, notes, and snippets.

@piotrbrzezina
Created September 14, 2018 08:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save piotrbrzezina/26f80f17bae3932bd6da2328b81155be to your computer and use it in GitHub Desktop.
Save piotrbrzezina/26f80f17bae3932bd6da2328b81155be to your computer and use it in GitHub Desktop.
Flashcard step 3 (setup serialization groups in @ApiResource)
<?php
// ...
/**
* @ApiResource(
* normalizationContext={"groups"={"subjectList"}},
* denormalizationContext={"groups"={"subjectCreate"}}
* ) ...
*/
class Subject
{
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment