Add Queue Pro billing, renewal, and scheduler.
Deploy Ladill Queue / deploy (push) Successful in 42s
Deploy Ladill Queue / deploy (push) Successful in 42s
Organizations can upgrade from wallet with plan expiry enforcement and nightly qms:pro-renew charges. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -4,6 +4,9 @@ namespace App\Providers;
|
||||
|
||||
use App\Events\ServiceEventOccurred;
|
||||
use App\Listeners\PlatformServiceEventListener;
|
||||
use App\Models\User;
|
||||
use App\Services\Qms\OrganizationResolver;
|
||||
use App\Services\Qms\PlanService;
|
||||
use Illuminate\Cache\RateLimiting\Limit;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Event;
|
||||
@@ -28,6 +31,21 @@ class AppServiceProvider extends ServiceProvider
|
||||
return Limit::perMinute(30)->by((string) $key);
|
||||
});
|
||||
|
||||
View::composer('partials.sidebar', function ($view) {
|
||||
/** @var User|null $user */
|
||||
$user = auth()->user();
|
||||
$isPro = false;
|
||||
|
||||
if ($user) {
|
||||
$organization = app(OrganizationResolver::class)->resolveForUser($user);
|
||||
if ($organization) {
|
||||
$isPro = app(PlanService::class)->isPro($organization);
|
||||
}
|
||||
}
|
||||
|
||||
$view->with('isPro', $isPro);
|
||||
});
|
||||
|
||||
View::composer(['partials.topbar'], function ($view) {
|
||||
$view->with(\App\Support\MobileTopbar::resolve());
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user