diff --git a/Updated_Cms/routes/channels.php b/Updated_Cms/routes/channels.php index 89f9832126..ec93139a45 100644 --- a/Updated_Cms/routes/channels.php +++ b/Updated_Cms/routes/channels.php @@ -13,4 +13,6 @@ use Illuminate\Support\Facades\Broadcast; | */ -Broadcast::channel('App.Models.User.{id}', fn ($user, $id) => (int) $user->id === (int) $id); +Broadcast::channel('App.Models.User.{id}', function (\App\Models\User $user, int $id): bool { + return $user->id === $id; +}); diff --git a/Updated_Cms/routes/web.php b/Updated_Cms/routes/web.php index ed89cceeb0..cc85b4868b 100644 --- a/Updated_Cms/routes/web.php +++ b/Updated_Cms/routes/web.php @@ -200,12 +200,13 @@ Route::middleware(['maintenance', 'check.ban', 'force.staff.2fa'])->group(functi if (Features::enabled(Features::twoFactorAuthentication())) { $twoFactorLimiter = config('fortify.limiters.two-factor'); + $guard = config('fortify.guard'); Route::post('/two-factor-challenge', [TwoFactorAuthenticatedSessionController::class, 'store']) ->middleware( array_filter([ - 'guest:' . config('fortify.guard'), - $twoFactorLimiter ? 'throttle:' . $twoFactorLimiter : null, - ]), + is_string($guard) ? 'guest:' . $guard : null, + is_string($twoFactorLimiter) ? 'throttle:' . $twoFactorLimiter : null, + ]) ); }