romanbican / roles

Powerful package for handling roles and permissions in Laravel 5
MIT License
1.16k stars 296 forks source link

User.php error #204

Open Eductiveo opened 7 years ago

Eductiveo commented 7 years ago

Hello,

I have this in my User.php (model)

<?php

namespace App;

use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Bican\Roles\Traits\HasRoleAndPermission;
use Bican\Roles\Contracts\HasRoleAndPermission as HasRoleAndPermissionContract;

class User extends Authenticatable implements HasRoleAndPermissionContract
{
    use Notifiable, HasRoleAndPermission;

When I visit my website, I get this error:

FatalErrorException in User.php line 11: Declaration of Illuminate\Database\Eloquent\Model::is() must be compatible with Bican\Roles\Contracts\HasRoleAndPermission::is($role, $all = false)

Hope someone can help me

Ricky-rick commented 7 years ago

We decided to update and maintain a copy of bican roles. This issue is fixed in this copy. You can find it on packagist: https://packagist.org/packages/ultraware/roles