renoki-co / jetstream-cashier-billing-portal

Cashierstream is a simple Spark alternative written for Laravel Jetstream, with the super-power of tracking plan quotas, like seats or projects number on a per-plan basis
Apache License 2.0
163 stars 20 forks source link

Errors with routing about User model. #18

Closed SequelONE closed 3 years ago

SequelONE commented 3 years ago

/user/billing/subscription

Call to undefined method App\Models\User::subscription()

/user/billing/portal

Call to undefined method App\Models\User::createOrGetStripeCustomer()
JamirHossainAfridi commented 3 years ago

i also stuck on this problem.

rennokki commented 3 years ago

Package version? Laravel version?

SequelONE commented 3 years ago

Package version? Laravel version?

"renoki-co/jetstream-cashier-billing-portal": "^3.1",
"laravel/framework": "^8.12",
rennokki commented 3 years ago

Have you recently upgraded from package 2.x to 3.x?

rennokki commented 3 years ago

Make sure to also install Cashier for Stripe in the project, including the Billable trait and the tables, because Cashier Billing Portal does not install them for you: https://laravel.com/docs/8.x/billing

SequelONE commented 3 years ago

Have you recently upgraded from package 2.x to 3.x?

No. I installed according to the documentation on the newly installed Laravel.

Make sure to also install Cashier for Stripe in the project, including the Billable trait and the tables, because Cashier Billing Portal does not install them for you: https://laravel.com/docs/8.x/billing

"laravel/cashier": "^12.9",

rennokki commented 3 years ago

You still need to prepare the models: https://laravel.com/docs/8.x/billing#billable-model