Add POS Pro subscription billing and free-tier limits.
Deploy Ladill POS / deploy (push) Successful in 43s
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:
@@ -3,6 +3,7 @@
|
||||
namespace App\Providers;
|
||||
|
||||
use App\Models\PosLocation;
|
||||
use App\Services\Pos\SubscriptionService;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use App\Support\MobileTopbar;
|
||||
use Illuminate\Support\Facades\View;
|
||||
@@ -23,11 +24,15 @@ class AppServiceProvider extends ServiceProvider
|
||||
// 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 = ladill_account()) {
|
||||
if ($account) {
|
||||
$restaurant = PosLocation::owned((string) $account->public_id)
|
||||
->where('service_style', PosLocation::STYLE_RESTAURANT)
|
||||
->exists();
|
||||
$view->with('isPro', app(SubscriptionService::class)->isPro($account));
|
||||
} else {
|
||||
$view->with('isPro', false);
|
||||
}
|
||||
$view->with('posRestaurant', $restaurant);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user