Reputation: 5094
I'm trying to use laravel cashier for a website I'm building but I am getting this error:
Declaration of
Laravel\Cashier\BillableTrait::invoices($parameters = Array)
must be compatible withLaravel\Cashier\BillableInterface::invoices()
I've followed the installation instructions that are on the laravel website.
My user model:
<?php
use Illuminate\Auth\UserTrait;
use Illuminate\Auth\UserInterface;
use Illuminate\Auth\Reminders\RemindableTrait;
use Illuminate\Auth\Reminders\RemindableInterface;
use Laravel\Cashier\BillableTrait;
use Laravel\Cashier\BillableInterface;
class User extends Eloquent implements UserInterface, RemindableInterface, BillableInterface
{
use UserTrait, RemindableTrait, BillableTrait;
/**
* The database table used by the model.
*
* @var string
*/
protected $table = 'users';
/**
* @var array
*/
protected $dates = ['trial_ends_at', 'subscription_ends_at'];
/**
* The attributes excluded from the model's JSON form.
*
* @var array
*/
protected $hidden = array('password', 'remember_token');
}
Any help would be greatly appreciated.
Thanks in advance.
Upvotes: 1
Views: 569
Reputation: 5825
I ran into this error too. It seems to only be a problem (so far) with laravel/cashier version 2.0.4. I reverted to version 2.0.3.
Upvotes: 2
Reputation: 2861
It sounds like you might have some composer issues with versions/cache. Have you done a composer dumpautoload
or better yet a composer update
, then php artisan cache:clear
?
What does your composer.json
look like for the Cashier entry?
Upvotes: 0