diff --git a/README.md b/README.md index 86a2246..edcc841 100644 --- a/README.md +++ b/README.md @@ -185,6 +185,7 @@ For logging in: | `login_form_password` | Renders the password field | | `login_form_csrf` | Renders a hidden field that contains a CSRF token. | | `login_form_submit` | Renders the submit button | +| `login_redirect_url` | redirect to "/" after submit | Each field function above takes an optional `withlabel` argument and the `labels` argument diff --git a/src/Twig/LoginFormExtension.php b/src/Twig/LoginFormExtension.php index a8dd244..2e0e48e 100644 --- a/src/Twig/LoginFormExtension.php +++ b/src/Twig/LoginFormExtension.php @@ -48,6 +48,7 @@ public function getFunctions(): array new TwigFunction('login_form_password', [$this, 'getPasswordField'], $safe), new TwigFunction('login_form_csrf', [$this, 'getCsrfField'], $safe), new TwigFunction('login_form_submit', [$this, 'getSubmitButton'], $safe), + new TwigFunction('login_redirect_url', [$this, 'getRedirectField'], $safe), ]; }