You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RoutePath will get the config value for a given path with the config() function (see below). Because of that, dots are representing config paths and each item before a dot is an array.
The easiest fix is to change the default config object (and maybe the docs). But I think it would be more relevant if RoutePath::for() would get the whole paths array with config('fortify.paths') and then get the custom path if it exists.
Steps To Reproduce
Define a custom path for a route with a dot (for instance two-factor.login):
As Laravel is an open source project, we rely on the community to help us diagnose and fix issues as it is not possible to research and fix every issue reported to us via GitHub.
If possible, please make a pull request fixing the issue you have described, along with corresponding tests. All pull requests are promptly reviewed by the Laravel team.
Fortify Version
1.18.0
Laravel Version
10.16.2
PHP Version
8.2.8
Database Driver & Version
No response
Description
When there is a dot in the route name, it is not possible to customize route paths the way it is described in the default config:
fortify/config/fortify.php
Lines 20 to 42 in b5743b0
RoutePath
will get the config value for a given path with theconfig()
function (see below). Because of that, dots are representing config paths and each item before a dot is an array.fortify/src/RoutePath.php
Line 16 in b5743b0
Instead, route paths should be declared with arrays actually:
The easiest fix is to change the default config object (and maybe the docs). But I think it would be more relevant if
RoutePath::for()
would get the whole paths array withconfig('fortify.paths')
and then get the custom path if it exists.Steps To Reproduce
Define a custom path for a route with a dot (for instance
two-factor.login
):Then get route list with
php artisan route:list
👉 The custom path is not taken in account
The text was updated successfully, but these errors were encountered: