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

[1.x] Added function to see when the trial is ending #69

Merged
merged 3 commits into from
Aug 31, 2020
Merged

[1.x] Added function to see when the trial is ending #69

merged 3 commits into from
Aug 31, 2020

Conversation

yoeriboven
Copy link
Contributor

PR adds a trialEndsAt function to the Billable trait.

This allows you to write code like this:

@if ($user->onTrial())
    Your trial ends at {{ $user->trialEndsAt() }}.
@endif

Without this you'd first have to check whether the trial is generic or tied to a subscription.

It also lets you pass in a subscription name as the parameter ($user->trialEndsAt('main')).

@driesvints driesvints changed the title Added function to see when the trial is ending [1.x] Added function to see when the trial is ending Aug 31, 2020
@taylorotwell
Copy link
Member

Tests failing?

@driesvints
Copy link
Member

@taylorotwell all tests for prs on this repo will fail because OP's don't have their env variables set for github actions.

@driesvints
Copy link
Member

I always make sure tests pass before releasing. This PR shouldn't break anything afaik.

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.

3 participants