Skip to content
This repository was archived by the owner on Nov 30, 2022. It is now read-only.

Commit b2c4422

Browse files
authored
Register middlewares automatically
1 parent 18c8a9f commit b2c4422

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/ShopifyApp/ShopifyAppProvider.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@ 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);
47+
4148
}
4249

4350
/**

0 commit comments

Comments
 (0)