Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdcad1b3

Browse files
committed
Fix syntax for loading PSR-4 routes from PHP files
1 parent18397ef commitdcad1b3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎routing/custom_route_loader.rst‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,10 @@ Symfony provides several route loaders for the most common needs:
9292
9393
// loads routes from the PHP attributes (#[Route(...)])
9494
// of the controllers found in the given PSR-4 namespace root
95-
$routes->import('../src/Controller/', 'attribute@App\Controller');
95+
$routes->import(
96+
['path' => '../src/Controller/', 'namespace' => 'App\Controller'],
97+
'attribute',
98+
);
9699
97100
// loads routes from the PHP attributes (#[Route(...)])
98101
// of the controllers found in that directory

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp