Skip to content

Commit 7e99ca9

Browse files
trippotaylorotwellhafezdivandari
authored
Fix viewPrefix Method to Match Documentation Example (#1844)
* Fix viewPrefix method * Apply suggestion from @hafezdivandari Co-authored-by: Hafez Divandari <[email protected]> --------- Co-authored-by: Taylor Otwell <[email protected]> Co-authored-by: Hafez Divandari <[email protected]>
1 parent d1c21a2 commit 7e99ca9

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/Passport.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -598,9 +598,11 @@ public static function viewNamespace(string $namespace): void
598598
*/
599599
public static function viewPrefix(string $prefix): void
600600
{
601-
static::authorizationView($prefix.'authorize');
602-
static::deviceAuthorizationView($prefix.'device.authorize');
603-
static::deviceUserCodeView($prefix.'device.user-code');
601+
$prefix = rtrim($prefix, '.');
602+
603+
static::authorizationView($prefix.'.authorize');
604+
static::deviceAuthorizationView($prefix.'.device.authorize');
605+
static::deviceUserCodeView($prefix.'.device.user-code');
604606
}
605607

606608
/**

0 commit comments

Comments
 (0)