diff --git a/src/Http/Middleware/ShareInertiaData.php b/src/Http/Middleware/ShareInertiaData.php index 95641087f..2f9d1bd10 100644 --- a/src/Http/Middleware/ShareInertiaData.php +++ b/src/Http/Middleware/ShareInertiaData.php @@ -25,7 +25,7 @@ public function handle($request, $next) return [ 'canCreateTeams' => $request->user() && Jetstream::hasTeamFeatures() && - Gate::forUser($request->user())->authorize('create', Jetstream::newTeamModel()), + Gate::forUser($request->user())->check('create', Jetstream::newTeamModel()), 'canManageTwoFactorAuthentication' => Features::canManageTwoFactorAuthentication(), 'flash' => $request->session()->get('flash', []), 'hasApiFeatures' => Jetstream::hasApiFeatures(),