Skip to content

Commit

Permalink
checkout issue resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
idugan100 committed Feb 26, 2024
1 parent e4875d4 commit 86489a7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion app/Http/Middleware/EnsureIsSubscribed.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function handle(Request $request, Closure $next)

if (! isset($user)) {
return redirect(route('premium'));
} elseif (! $user->pm_type) {
} elseif (! $user->pm_type) { /**@phpstan-ignore-line */
return redirect(route('checkout'));
} elseif (! $user->subscribed('default') && $user->pm_type) {
return $user->redirectToBillingPortal(route('courses.index'));
Expand Down
3 changes: 0 additions & 3 deletions app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ class User extends Authenticatable
{
use Billable, HasApiTokens, HasFactory, Notifiable;

/** @var string */
public $pm_type;

/**
* The attributes that are mass assignable.
*
Expand Down

0 comments on commit 86489a7

Please sign in to comment.