File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,27 @@ symfonycasts_reset_password:
57
57
enable_garbage_collection : true
58
58
` ` `
59
59
60
+ If using PHP configuration files:
61
+
62
+ <details>
63
+ <summary>config/packages/reset_password.php</summary>
64
+
65
+ ` ` ` php
66
+ use App\Repository\ResetPasswordRequestRepository;
67
+ use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
68
+
69
+ return static function (ContainerConfigurator $containerConfigurator) : void {
70
+ $containerConfigurator->extension('symfonycasts_reset_password', [
71
+ ' request_password_repository' => ResetPasswordRequestRepository::class,
72
+ ' lifetime' => 3600,
73
+ ' throttle_limit' => 3600,
74
+ ' enable_garbage_collection' => true,
75
+ ]);
76
+ };
77
+ ```
78
+ </details >
79
+
80
+
60
81
The production environment may require the ` default_uri ` to be defined in the ` config/packages/routing.yaml ` to prevent the URI in emails to point to localhost.
61
82
62
83
``` yaml
@@ -68,6 +89,23 @@ when@prod:
68
89
default_uri : ' <your project' s root URI>'
69
90
` ` `
70
91
92
+ If using PHP configuration files:
93
+
94
+ <details>
95
+ <summary>config/packages/routing.php</summary>
96
+
97
+ ` ` ` php
98
+ if ($containerConfigurator->env() === 'prod') {
99
+ $containerConfigurator->extension('framework', [
100
+ ' router' => [
101
+ ' default_uri' => '<your project’s root URI>'
102
+ ],
103
+ ]);
104
+ }
105
+ ```
106
+ </details >
107
+
108
+
71
109
### Parameters:
72
110
73
111
#### ` request_password_repository `
You can’t perform that action at this time.
0 commit comments