Add POS Pro subscription billing and free-tier limits.
Deploy Ladill POS / deploy (push) Successful in 43s

Wallet-backed Pro unlocks unlimited products, restaurant mode, catalog imports, and ecosystem sync features.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-06-30 00:51:35 +00:00
co-authored by Cursor
parent 68255786e1
commit f800f0c1ca
17 changed files with 635 additions and 29 deletions
+29
View File
@@ -0,0 +1,29 @@
<?php
namespace App\Http\Middleware;
use App\Services\Pos\SubscriptionService;
use Closure;
use Illuminate\Http\Request;
use Symfony\Component\HttpFoundation\Response;
class EnsurePro
{
public function __construct(private readonly SubscriptionService $subscriptions) {}
public function handle(Request $request, Closure $next): Response
{
$user = ladill_account() ?? $request->user();
if ($user && $this->subscriptions->isPro($user)) {
return $next($request);
}
if ($request->expectsJson()) {
return response()->json(['message' => 'This feature requires Ladill POS Pro.'], 402);
}
return redirect()->route('pos.pro.index')
->with('upsell', 'That feature is part of Ladill POS Pro — subscribe to unlock it.');
}
}