3 years ago

Laravel Cashier (Billing)

Posted 3 years ago by cschoeni

Hello everybody I have a problem with Laravel Cashier. Here's what I've done

  1. I Installed laravel/cashier with composer require (controll in composer.json file its installed)
  2. I updated my composer file
  3. I registred Laravel\Cashier\CashierServiceProvider in my config file.
  4. I Copyied all of migration in my users_table an migrate that
  5. I setup my Model with "use Laravel\Cashier\Billable;" and with "use Billable;" in my User Class
  6. I copy the empedet Form from Stripe and paste that in my test page

My Problem: When i write the Code like this in the documentation

$user = Auth::id(); $user->newSubscription('main', 'monthly')->create($creditCardToken);

But with this code became a failre Call to a member function newSubscription() on integer

I can change the variable creditCardToken with the _token, but its not work. What i make false?

I hope you can Help my

Best regards Christoph

Please sign in or create an account to participate in this conversation.