File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -252,14 +252,12 @@ Use the ``methods`` option to restrict the verbs each route should respond to:
252
252
automatically for you when the :ref: `framework.http_method_override <configuration-framework-http_method_override >`
253
253
option is ``true ``.
254
254
255
- .. _routing-matching-expressions :
256
-
257
255
Matching Environments
258
256
~~~~~~~~~~~~~~~~~~~~~
259
257
260
- The ``env `` option can be used to make a route conditional on the
261
- :ref: `configuration environment <configuration-environments >`, the route will
262
- only be registered if the environment matches.
258
+ Use the ``env `` option to register a route only when the current
259
+ :ref: `configuration environment <configuration-environments >` matches the
260
+ given value:
263
261
264
262
.. configuration-block ::
265
263
@@ -274,11 +272,7 @@ only be registered if the environment matches.
274
272
275
273
class DefaultController extends AbstractController
276
274
{
277
- #[Route(
278
- '/tools',
279
- name: 'tools',
280
- env: 'dev',
281
- )]
275
+ #[Route('/tools', name: 'tools', env: 'dev')]
282
276
public function developerTools(): Response
283
277
{
284
278
// ...
@@ -320,6 +314,8 @@ only be registered if the environment matches.
320
314
;
321
315
};
322
316
317
+ .. _routing-matching-expressions :
318
+
323
319
Matching Expressions
324
320
~~~~~~~~~~~~~~~~~~~~
325
321
You can’t perform that action at this time.
0 commit comments