laravel-wallet: Confliction With Laravel Cashier

Describe the bug Already handling subscriptions with Laravel Cashier, so as per Laravel Cashier my User Model contains Cahier’s Billable trait

use Laravel\Cashier\Billable; 
class User extends Authenticatable
{
   use Billable;
    ....
    ....
}

Now, need to use Wallet’s Purchases feature So Changed my User model to this

use Laravel\Cashier\Billable;
use Bavix\Wallet\Traits\HasWallet;
use Bavix\Wallet\Interfaces\Wallet;
use Bavix\Wallet\Traits\CanPay;
use Bavix\Wallet\Interfaces\Customer;
class User extends \TCG\Voyager\Models\User implements Customer
{
    use Billable, HasApiTokens, HasFactory, Notifiable, SoftDeletes, HasWallet;
    use CanPay;
    .......
    .....

But now I am getting below error and even unable to serve. **PHP Fatal error: Trait method Bavix\Wallet\Traits\CanPay::pay has not been applied as App\Models\User::pay, because of collision with Laravel\Cashier\Billable::pay in /var/www/html/better_cloud/app/Models/User.php on line 20

Symfony\Component\ErrorHandler\Error\FatalError

Trait method Bavix\Wallet\Traits\CanPay::pay has not been applied as App\Models\User::pay, because of collision with Laravel\Cashier\Billable::pay**

image

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16 (7 by maintainers)

Most upvoted comments

Maxim @rez1dent3 Thanks for the quick support as well as such an awesome digital wallet.

if the purchase was this wallet, then yes

Yes