spatie / activitylog

A very simple activity logger to monitor the users of your website or application
https://spatie.be/opensource/laravel
MIT License
582 stars 75 forks source link

Collisions with Other Trait Methods on App\User #30

Closed karpuzkan closed 8 years ago

karpuzkan commented 8 years ago

Hello, I try to add Log Model Events. It's working fine with my models but when i try to implement it to my App\User model i have this error

PHP Fatal error: Trait method bootLogsActivity has not been applied, because there are collisions with other trait methods on App\User in laravel/app/User.php on line 80

I use at top this way


namespace App;

use Illuminate\Auth\Authenticatable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Auth\Passwords\CanResetPassword;
use Illuminate\Foundation\Auth\Access\Authorizable;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract;
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
use Spatie\Permission\Traits\HasRoles;
use Spatie\Activitylog\LogsActivityInterface;
use Spatie\Activitylog\LogsActivity;

class User extends Model implements
    AuthenticatableContract,
    AuthorizableContract,
    LogsActivityInterface,
    CanResetPasswordContract
{
    // LOGS
    use LogsActivity;

Thanks.

karpuzkan commented 8 years ago

since my typo fault, i wrote use LogsActivity again, i got this error. Sorry for consuming your time...