refactor(middleware): use Account::isOnTrial() instead of onGenericTrial()
Centralizes the 'is the user on any kind of trial?' question in the model. Equivalent behavior — Cashier's subscribed() already includes trialing subscriptions — but semantically cleaner and easier to extend.
This commit is contained in:
parent
83f9e69eed
commit
5c03f9cd11
1 changed files with 1 additions and 1 deletions
|
|
@ -27,7 +27,7 @@ public function handle(Request $request, Closure $next): Response
|
|||
if (! config('trypost.self_hosted')) {
|
||||
$hasAccess = $account && (
|
||||
$account->subscribed(Account::SUBSCRIPTION_NAME)
|
||||
|| $account->onGenericTrial()
|
||||
|| $account->isOnTrial()
|
||||
);
|
||||
|
||||
if (! $hasAccess) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue