gerardojbaez / laraplans

SaaS style recurring plans for Laravel.
http://laraplans.readthedocs.io
MIT License
180 stars 81 forks source link

PHP Fatal error: Trait method newSubscription has not been applied #38

Closed wisusdev closed 6 years ago

wisusdev commented 6 years ago

Trait method newSubscription has not been applied, because there are collisions with other trait methods on App\User

User Model

use Laravel\Cashier\Billable; use Illuminate\Notifications\Notifiable; use Lexx\ChatMessenger\Traits\Messagable; use Zizaco\Entrust\Traits\EntrustUserTrait; use Gerardojbaez\Laraplans\Contracts\PlanSubscriberInterface; use Gerardojbaez\Laraplans\Traits\PlanSubscriber; use Illuminate\Foundation\Auth\User as Authenticatable;

class User extends Authenticatable implements PlanSubscriberInterface { use PlanSubscriber, Notifiable, EntrustUserTrait, Billable, Messagable; }

The conflict is with Cashier, can it be solved?

gerardojbaez commented 6 years ago

Laraplans shouldn't be used with Cashier; you should use one of the two.

If you really want to use both of them, you will need to choose one of the two newSubscriptions methods.

See the PHP's documentation website for Trait method conflicts.