Skip to content

Commit dfbcc31

Browse files
committed
Make fallback route registration optional
1 parent 3bb7ae8 commit dfbcc31

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

config/shopify-integration.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
'app_scopes' => env('SCOPES', 'not_defined'),
1212
'shop_custom_domain' => env('SHOP_CUSTOM_DOMAIN', null),
1313

14+
'register_fallback_route' => true,
15+
1416
/*
1517
|--------------------------------------------------------------------------
1618
| Shopify billing

src/LaravelShopifyIntegrationServiceProvider.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ public function configurePackage(Package $package): void
2929
->name('laravel-shopify-integration')
3030
->hasConfigFile()
3131
->hasMigrations(['create_shopify_sessions_table', 'add_is_development_shop_to_shopify_sessions'])
32-
->hasRoutes('web', 'api');
32+
->hasRoutes('api');
33+
34+
if (config('shopify-integration.register_fallback_route', true)) {
35+
$package->hasRoutes('web');
36+
}
3337

3438
$router = $this->app->make(Router::class);
3539
$router->aliasMiddleware('shopify.auth', EnsureShopifySession::class);

0 commit comments

Comments
 (0)