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 ApiPlatform\Core\Annotation\ApiFilter; | |
/** | |
* // ... | |
* @ApiFilter( | |
* SearchFilter::class, |
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 ApiPlatform\Core\Annotation\ApiSubresource; | |
// ... | |
class Lesson | |
{ | |
/** | |
* ... | |
* @ApiSubresource() |
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 | |
// ... | |
class User implements UserInterface | |
{ | |
/** | |
* ... | |
* @Assert\NotBlank(groups={"userCreate"}) | |
* @Assert\Length(max="255", groups={"userCreate"}) |
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 | |
// ... | |
/** | |
* @ApiResource( | |
* normalizationContext={"groups"={"userList"}}, | |
* denormalizationContext={"groups"={"userCreate"}}, | |
* validationGroups="userCreate", | |
* itemOperations={ |
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 | |
// ... | |
/** | |
* @ApiResource( | |
* normalizationContext={"groups"={"lessonList"}}, | |
* denormalizationContext={"groups"={"lessonCreate"}}, | |
* itemOperations={"get","put"} | |
* ) |
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 | |
// ... | |
/** | |
* @ApiResource( | |
* normalizationContext={"groups"={"subjectList"}}, | |
* denormalizationContext={"groups"={"subjectCreate"}} | |
* ) ... | |
*/ | |
class Subject |
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
<? | |
/** | |
* @ApiResource( | |
* collectionOperations={ | |
* "get", // pobieranie list elementów | |
* "post" // tworzenie nowego elementu | |
* }, | |
* itemOperations={ | |
* "get", // pobieranie konrketnego elementu | |
* "put", // aktualizacja |
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 | |
// ... | |
class Flashcard | |
{ | |
/** | |
* ... | |
* @Assert\NotBlank() | |
* @Assert\Length(max="255") | |
*/ | |
public $question; |
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 | |
{ | |
/** | |
* ... |
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() | |
* ... |