Laravel Cashier BillableInterface错误

时间:2014-09-30 13:49:17

标签: php laravel

将implements BillableInterface行添加到用户模型后,出现以下错误:

    Symfony \ Component \ Debug \ Exception \ FatalErrorException (E_COMPILE_ERROR) 
    Declaration of Laravel\Cashier\BillableTrait::invoices($parameters = Array) must be compatible     
    with Laravel\Cashier\BillableInterface::invoices()

我按照文档操作,然后运行编辑器更新,然后清除了缓存,但仍然没有运气。

以下是型号代码:

use Laravel\Cashier\BillableTrait;
use Laravel\Cashier\BillableInterface;

class User extends Eloquent implements BillableInterface  {

use BillableTrait;

/**
 * The database table used by the model.
 *
 * @var string
 */
protected $table = 'users';

/**
 * The attributes excluded from the model's JSON form.
 *
 * @var array
 */
protected $hidden = array('password', 'remember_token');


protected $fillable = array('username','name','email','password');

protected $guarded = array('id');

protected $dates = ['trial_ends_at', 'subscription_ends_at'];

1 个答案:

答案 0 :(得分:1)

PHP 5.4.12确实出了问题。我更新到5.5.12,一切都很酷。