Deploy Ladill Woo Manager / deploy (push) Successful in 51s
Free: 1 store and 20 products. Pro/Business mirrors Invoice pricing (GHS 49/149) with wallet renewals, Paystack prepay, session-based store switcher, and scoped UI. Co-authored-by: Cursor <cursoragent@cursor.com>
32 lines
1.0 KiB
PHP
32 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Services\Woo\SubscriptionService;
|
|
use App\Support\CurrentWooStore;
|
|
use Illuminate\Support\ServiceProvider;
|
|
use Illuminate\Support\Facades\View;
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
{
|
|
public function register(): void
|
|
{
|
|
//
|
|
}
|
|
|
|
public function boot(): void
|
|
{
|
|
View::composer(['partials.sidebar', 'partials.topbar'], function ($view) {
|
|
$account = ladill_account() ?? auth()->user();
|
|
$svc = app(SubscriptionService::class);
|
|
$stores = app(CurrentWooStore::class);
|
|
|
|
$view->with('isPro', $account ? $svc->isPro($account) : false);
|
|
$view->with('hasPaidPlan', $account ? $svc->hasPaidPlan($account) : false);
|
|
$view->with('isEnterprise', $account ? $svc->isEnterprise($account) : false);
|
|
$view->with('wooActiveStores', $account ? $stores->activeStores($account) : collect());
|
|
$view->with('currentWooStore', $account ? $stores->resolve($account) : null);
|
|
});
|
|
}
|
|
}
|