diff --git a/src/JetstreamServiceProvider.php b/src/JetstreamServiceProvider.php index e832711ee..fe1387ebe 100644 --- a/src/JetstreamServiceProvider.php +++ b/src/JetstreamServiceProvider.php @@ -35,28 +35,6 @@ class JetstreamServiceProvider extends ServiceProvider public function register() { $this->mergeConfigFrom(__DIR__.'/../config/jetstream.php', 'jetstream'); - - $this->callAfterResolving(BladeCompiler::class, function () { - if (config('jetstream.stack') === 'livewire' && class_exists(Livewire::class)) { - Livewire::component('navigation-menu', NavigationMenu::class); - Livewire::component('profile.update-profile-information-form', UpdateProfileInformationForm::class); - Livewire::component('profile.update-password-form', UpdatePasswordForm::class); - Livewire::component('profile.two-factor-authentication-form', TwoFactorAuthenticationForm::class); - Livewire::component('profile.logout-other-browser-sessions-form', LogoutOtherBrowserSessionsForm::class); - Livewire::component('profile.delete-user-form', DeleteUserForm::class); - - if (Features::hasApiFeatures()) { - Livewire::component('api.api-token-manager', ApiTokenManager::class); - } - - if (Features::hasTeamFeatures()) { - Livewire::component('teams.create-team-form', CreateTeamForm::class); - Livewire::component('teams.update-team-name-form', UpdateTeamNameForm::class); - Livewire::component('teams.team-member-manager', TeamMemberManager::class); - Livewire::component('teams.delete-team-form', DeleteTeamForm::class); - } - } - }); } /** @@ -91,6 +69,26 @@ public function boot() if (config('jetstream.stack') === 'inertia' && class_exists(Inertia::class)) { $this->bootInertia(); } + + if (config('jetstream.stack') === 'livewire' && class_exists(Livewire::class)) { + Livewire::component('navigation-menu', NavigationMenu::class); + Livewire::component('profile.update-profile-information-form', UpdateProfileInformationForm::class); + Livewire::component('profile.update-password-form', UpdatePasswordForm::class); + Livewire::component('profile.two-factor-authentication-form', TwoFactorAuthenticationForm::class); + Livewire::component('profile.logout-other-browser-sessions-form', LogoutOtherBrowserSessionsForm::class); + Livewire::component('profile.delete-user-form', DeleteUserForm::class); + + if (Features::hasApiFeatures()) { + Livewire::component('api.api-token-manager', ApiTokenManager::class); + } + + if (Features::hasTeamFeatures()) { + Livewire::component('teams.create-team-form', CreateTeamForm::class); + Livewire::component('teams.update-team-name-form', UpdateTeamNameForm::class); + Livewire::component('teams.team-member-manager', TeamMemberManager::class); + Livewire::component('teams.delete-team-form', DeleteTeamForm::class); + } + } } /**