Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User has any subscription #262

Merged
merged 4 commits into from
Aug 26, 2024

Conversation

ignaciocunado
Copy link
Contributor

@ignaciocunado ignaciocunado commented Aug 10, 2024

closes #261

@ignaciocunado ignaciocunado changed the title Feat/user has any subscription User has any subscription Aug 10, 2024
@sandervanhooft
Copy link
Collaborator

How about this instead on the Billable trait?

    public function hasActiveSubscription(): bool
    {
        return $this
            ->subscriptions()
            ->whereActive()
            ->exists();
    }

src/Billable.php Outdated Show resolved Hide resolved
@Naoray Naoray merged commit a13c992 into mollie:main Aug 26, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Getter for if a user is subscribed
3 participants