Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

check twig if user has role

{% if is_granted('ROLE_ADMIN') %}
    <a href="...">Delete</a>
{% endif %}
Source by symfony.com #
 
PREVIOUS NEXT
Tagged: #check #twig #user #role
ADD COMMENT
Topic
Name
6+4 =