Skip to content

Commit

Permalink
Merge pull request #327 from phh/patch-1
Browse files Browse the repository at this point in the history
Use BreezyCore::slug() instead of hardcoded my-profile
  • Loading branch information
jeffgreco13 authored Jan 19, 2024
2 parents 0e36430 + 13c13f6 commit 9462b8a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Middleware/MustTwoFactor.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ public function handle(Request $request, Closure $next): Response
filament()->auth()->check() &&
! str($request->route()->getName())->contains('logout')
) {
/** @var BreezyCore $breezy */
$breezy = filament('filament-breezy');

Check failure on line 23 in src/Middleware/MustTwoFactor.php

View workflow job for this annotation

GitHub Actions / phpstan

PHPDoc tag @var for variable $breezy contains unknown class Jeffgreco13\FilamentBreezy\Middleware\BreezyCore.

Check failure on line 23 in src/Middleware/MustTwoFactor.php

View workflow job for this annotation

GitHub Actions / phpstan

PHPDoc tag @var for variable $breezy contains unknown class Jeffgreco13\FilamentBreezy\Middleware\BreezyCore.
$myProfileRouteName = 'filament.'.filament()->getCurrentPanel()->getId().'.pages.my-profile';

$myProfileRouteName = 'filament.'.filament()->getCurrentPanel()->getId().'.pages.'.$breezy->slug();

Check failure on line 25 in src/Middleware/MustTwoFactor.php

View workflow job for this annotation

GitHub Actions / phpstan

Call to method slug() on an unknown class Jeffgreco13\FilamentBreezy\Middleware\BreezyCore.

Check failure on line 25 in src/Middleware/MustTwoFactor.php

View workflow job for this annotation

GitHub Actions / phpstan

Call to method slug() on an unknown class Jeffgreco13\FilamentBreezy\Middleware\BreezyCore.

$myProfileRouteParameters = [];

if (filament()->hasTenancy()) {
Expand Down

0 comments on commit 9462b8a

Please sign in to comment.