user(); } protected function currentStore(Request $request): ?WooStore { return app(CurrentWooStore::class)->resolve($this->accountUser($request)); } protected function currentStoreOrFail(Request $request): WooStore { $store = $this->currentStore($request); abort_if(! $store, 404, 'Connect a WooCommerce store to continue.'); return $store; } protected function authorizedStore(Request $request, int $storeId): WooStore { return WooStore::query() ->where('user_id', $this->accountUser($request)->id) ->whereKey($storeId) ->where('status', WooStore::STATUS_ACTIVE) ->firstOrFail(); } }