Skip to content

Commit

Permalink
Update enum.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
BaptisteChabrol authored Dec 30, 2024
1 parent d184e9f commit 5f3f092
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/functions/enum.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
{{ enum('App\\MyEnum').SomeCase.value }}
{# get all cases of an enum #}
{% enum('App\\MyEnum').cases %}
{{ enum('App\\MyEnum').cases }}
{# call any methods of the enum class #}
{% enum('App\\MyEnum').someMethod() %}
{{ enum('App\\MyEnum').someMethod() }}
When using a string literal for the ``enum`` argument, it will be validated during compile time to be a valid enum name.

Expand Down

0 comments on commit 5f3f092

Please sign in to comment.