with(MobileTopbar::resolve()); }); // Expose whether the signed-in account runs in restaurant mode so the // sidebar can surface the Floor + Kitchen nav only when relevant. View::composer('partials.sidebar', function ($view) { $account = ladill_account(); $restaurant = false; if ($account) { $restaurant = PosLocation::owned((string) $account->public_id) ->where('service_style', PosLocation::STYLE_RESTAURANT) ->exists(); $svc = app(SubscriptionService::class); $view->with('isPro', $svc->isPro($account)); $view->with('hasPaidPlan', $svc->hasPaidPlan($account)); $view->with('isEnterprise', $svc->isEnterprise($account)); } else { $view->with('isPro', false); $view->with('hasPaidPlan', false); $view->with('isEnterprise', false); } $view->with('posRestaurant', $restaurant); }); } }