Closed gathuku closed 5 years ago
Did you add use App\User;
to the top of your file, beneath the namespace?
am using
use App\Models\User;
Is your User model in a Models folder and namespaced as App/Models/User?
@snipe Yes
The error is in this file.
vendor/laravel/cashier-braintree/src/Subscription.php
In owner function
public function owner()
{
$model = getenv('BRAINTREE_MODEL') ?: config('services.braintree.model', 'App\\User');
$model = new $model;
return $this->belongsTo(get_class($model), $model->getForeignKey());
}
I have fixed it in config('services.braintree.model', 'App\\User')
Now its
config('cashier.model')
or use .env
to setup the cashier model:
CASHIER_MODEL=App\Models\User
https://laravel.com/docs/6.x/billing#billable-model
Having the error when i try to swap a braintree subscription.Please help.