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

Advanced view does not expand #11

Open
asivaneswaran opened this issue Jun 9, 2020 · 1 comment
Open

Advanced view does not expand #11

asivaneswaran opened this issue Jun 9, 2020 · 1 comment

Comments

@asivaneswaran
Copy link

Hi,

When I click the manage subscription, it does not expand.

And I get this in the response:

{"subscription":null}

@asivaneswaran
Copy link
Author

asivaneswaran commented Jun 9, 2020

I found the reason. In StripeSubscriptionsController, you do this:

/** @var \Laravel\Cashier\Subscription $subscription */
        $subscription = Subscription::find($subscriptionId);

But you need to retrieve the custom model like you do in the DatabaseSubscriptionsController

$stripeModel = $this->config->get('cashier.model');

        /** @var \Illuminate\Database\Eloquent\Model $billableModel */
        $billableModel = (new $stripeModel());
        /** @var \Laravel\Cashier\Billable|\Illuminate\Database\Eloquent\Model $billable */
        $billable = $billableModel->find($billableId);

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

No branches or pull requests

1 participant