-
Notifications
You must be signed in to change notification settings - Fork 294
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ability to override routes with custom paths (#458)
* Add override routes with custom names * Update formatting * Update formatting again * Move import statement to bottom * Update route 'name' to 'path' * formatting * Update RoutePath.php --------- Co-authored-by: Taylor Otwell <taylor@laravel.com>
- Loading branch information
1 parent
7800dcb
commit c388856
Showing
3 changed files
with
68 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
namespace Laravel\Fortify; | ||
|
||
class RoutePath | ||
{ | ||
/** | ||
* Get the route path for the given route name. | ||
* | ||
* @param string $routeName | ||
* @param string $default | ||
* @return string | ||
*/ | ||
public static function for(string $routeName, string $default) | ||
{ | ||
return config('fortify.paths.'.$routeName) ?? $default; | ||
} | ||
} |