-
-
Notifications
You must be signed in to change notification settings - Fork 438
Closed
Description
Shouldn't "BlogPost" be replaced by an entity name?
Normalizer
public function supportsNormalization($data, $format = null): bool
{
return $data instanceof \App\Entity\BlogPost;
}Voter
protected function supports($attribute, $subject)
{
// replace with your own logic
// https://symfony.com/doc/current/security/voters.html
return in_array($attribute, ['POST_EDIT', 'POST_VIEW'])
&& $subject instanceof \App\Entity\BlogPost;
}Metadata
Metadata
Assignees
Labels
No labels