Skip to content

Commit

Permalink
fix: jetstream routes
Browse files Browse the repository at this point in the history
  • Loading branch information
joelbutcher committed Oct 27, 2023
1 parent 3b74d46 commit a3a9d00
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions src/SocialstreamServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,21 @@ protected function bootLaravelBreeze(): void
return;
}

// Routes
if (class_exists('\App\Providers\VoltServiceProvider')) {
return;
} elseif (class_exists('\App\Http\Middleware\HandleInertiaRequests')) {
$this->publishes(paths: [
__DIR__.'/../stubs/breeze/inertia-common/routes/auth.php' => base_path('routes/auth.php'),
__DIR__.'/../stubs/breeze/inertia-common/routes/web.php' => base_path('routes/web.php'),
], groups: 'socialstream-routes');
} elseif (class_exists('\App\Http\Controllers\ProfileController')) {
$this->publishes(paths: [
__DIR__.'/../stubs/breeze/default/routes/auth.php' => base_path('routes/auth.php'),
__DIR__.'/../stubs/breeze/default/routes/web.php' => base_path('routes/web.php'),
], groups: 'socialstream-routes');
}

// Migrations
$this->publishes([
__DIR__.'/../database/migrations/2014_10_12_000000_create_breeze_users_table.php' => database_path('migrations/2014_10_12_000000_create_users_table.php'),
Expand Down Expand Up @@ -213,21 +228,6 @@ protected function bootLaravelJetstream(): void
], 'socialstream-routes');
}

// Routes
if (class_exists('\App\Providers\VoltServiceProvider')) {
return;
} elseif (class_exists('\App\Http\Middleware\HandleInertiaRequests')) {
$this->publishes(paths: [
__DIR__.'/../stubs/breeze/inertia-common/routes/auth.php' => base_path('routes/auth.php'),
__DIR__.'/../stubs/breeze/inertia-common/routes/web.php' => base_path('routes/web.php'),
], groups: 'socialstream-routes');
} elseif (class_exists('\App\Http\Controllers\ProfileController')) {
$this->publishes(paths: [
__DIR__.'/../stubs/breeze/default/routes/auth.php' => base_path('routes/auth.php'),
__DIR__.'/../stubs/breeze/default/routes/web.php' => base_path('routes/web.php'),
], groups: 'socialstream-routes');
}

// Actions
$this->publishes(array_merge([
__DIR__.'/../stubs/app/Actions/Socialstream/' => app_path('Actions/Socialstream/'),
Expand Down

0 comments on commit a3a9d00

Please sign in to comment.