laravel / cashier-stripe

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.
https://laravel.com/docs/billing
MIT License
2.37k stars 667 forks source link

check if user is subscribed? documentation says this should work? #1664

Closed digimumo closed 5 months ago

digimumo commented 5 months ago

Cashier Stripe Version

13.17

Laravel Version

10.4

PHP Version

8.2

Database Driver & Version

Starting MySQL 8.0.32-1.2.11-server on Sail/docker

Description

In the Cashier documentation it says you can check if a user is subscribed by using the following example

@if ($user->subscribed())
    <p>You are subscribed.</p>
@endif

However, this does not work unless you pass a name for the subscription. I can work around this with my own subscription checks but it's a shame it doesn't work out of the box?

thanks.

Steps To Reproduce

The billable trait is on the User model. A user has subscribed and confirmed with stripe and the database is populated as it should.

driesvints commented 5 months ago

Hey there,

Unfortunately we don't support this version anymore. Please check out our support policy on which versions we are currently supporting. Can you please try to upgrade to the latest version and see if your problem persists? If so, please open up a new issue and we'll help you out.

Thanks!