Skip to content

Commit 2fa7f87

Browse files
authored
Merge pull request gnikyt#153 from amosmos/patch-2
Register middlewares automatically
2 parents 18c8a9f + 2b305a7 commit 2fa7f87

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/ShopifyApp/ShopifyAppProvider.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ public function boot()
3838
// Shop observer
3939
$shopModel = config('shopify-app.shop_model');
4040
$shopModel::observe(ShopObserver::class);
41+
42+
// Middlewares
43+
$this->app['router']->aliasMiddleware('auth.shop', \OhMyBrew\ShopifyApp\Middleware\AuthShop::class);
44+
$this->app['router']->aliasMiddleware('auth.webhook', \OhMyBrew\ShopifyApp\Middleware\AuthWebhook::class);
45+
$this->app['router']->aliasMiddleware('auth.proxy', \OhMyBrew\ShopifyApp\Middleware\AuthProxy::class);
46+
$this->app['router']->aliasMiddleware('billable', \OhMyBrew\ShopifyApp\Middleware\Billable::class);
4147
}
4248

4349
/**

0 commit comments

Comments
 (0)