Skip to content

Commit ebe17df

Browse files
[Routing] Allow setting multiple envs in #[Route] attribute
1 parent 6b6a678 commit ebe17df

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

routing.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,11 +269,18 @@ given value:
269269
270270
class DefaultController extends AbstractController
271271
{
272-
#[Route('/tools', name: 'tools', env: 'dev')]
272+
// Using the Route attribute, you can specify multiple environments
273+
#[Route('/tools', name: 'tools', env: ['test', 'dev'])]
273274
public function developerTools(): Response
274275
{
275276
// ...
276277
}
278+
279+
#[Route('/test', name: 'test', env: 'test')]
280+
public function testScenario(): Response
281+
{
282+
// ...
283+
}
277284
}
278285
279286
.. code-block:: yaml

0 commit comments

Comments
 (0)