Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

brjohnson4's avatar

Check if User is Subscribed to Team or User Plan

I have a spark app with single user subscription, and I want to add an optional team billing feature. Is there a way I can see if each user is a member of a subscribed team versus subscribed individually (or a member of a non-subscribed team)?

I'm trying to find a way to hide the "billing" tabs for the single user subscription when a member of a paid team. As it stands right now, someone could pay twice, once for the team, and once individually.

Thanks!

0 likes
1 reply
brjohnson4's avatar

Okay, I've figured it out. You can check if teams are subscribed with the Auth::user()->currentTeam->subscribed(). So I wrap this in a couple of if statements.

@if(Auth::user()->currentTeam)
    @if(Auth::user()->currentTeam->subscribed())
        User is on a paid team.
    @else
        User is on a free team.
    @endif 
@else
    User is not on a team.
@endif 

Please or to participate in this conversation.