Почему методы не найдены в аутентифицируемых? Использование Laravel 6 Касса 10 с Stripe API? - PullRequest
0 голосов
/ 30 января 2020

Почему методы не найдены в Authenticatable? Я использую Laravel 6 Касса 10 с Stripe API. Пожалуйста, смотрите следующие ошибки в моем контроллере подписки.

 Method 'createSetupIntent' not found in \Illuminate\Contracts\Auth\Authenticatable|null 

 Method 'addPaymentMethod' not found in \Illuminate\Contracts\Auth\Authenticatable|null 

 Unhandled \Stripe\Exception\ApiErrorException 

Вышеуказанные ошибки отображаются в PHP шторм. Когда код фактически запускается в браузере, я получаю эту ошибку: ... Это имеет смысл, учитывая, что PHP Storm не может найти мои методы. Что вы, ребята, думаете?

 This customer has no attached payment source or default payment method.

Вот моя модель пользователя.

<?php

namespace App;

use Illuminate\Notifications\Notifiable;
use Illuminate\Database\Eloquent\Model;
use Jenssegers\Mongodb\Auth\User as Authenticatable;
use Laravel\Cashier\Billable;
use Illuminate\Foundation\Auth;

class User extends Authenticatable
{

    use  Billable, Notifiable;


    protected $connection = 'mongodb';


     /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [
        'name', 'email', 'username', 'password', 'phone',
    ];
/**
* The collection name
*
* @var array
*/
protected $collection = 'users';



/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $dates = ['deleted_at'];
    /**
     * The attributes that should be hidden for arrays.
     *
     * @var array
     */
    protected $hidden = [
        'password', 'remember_token',
    ];

    /**
     * The attributes that should be cast to native types.
     *
     * @var array
     */
    protected $casts = [
        'email_verified_at' => 'datetime',
    ];

}
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...