-
Notifications
You must be signed in to change notification settings - Fork 295
laravel 5.3 Declaration of Illuminate\Database\Eloquent\Model::is() must be compatible with Bican\Roles\Contracts\HasRoleAndPermission::is($role, $all = false) #190
Comments
Did that work before on Laravel 5.2 ? |
Yes he same code on laravel 5.2 works, but on this new version nop |
yes I tried also but no change @nikolaynesov |
I had the same error, and #189 seems to have fixed it for me. |
@Pa6 Are you still experiencing this error today? |
@nikolaynesov it is fixed now. Thanks |
Hello, I have the same issue on 5.4, seems that Model declare a new is() method that conflicts with code that used this metods on Model subclasses |
for compatibility it would be better to name the new metod equals(), since it is more standard for object comparing, moreover is() is often user to verify boolean attributes: is('enabled'), is('admin'), etc.... (that's my case) |
@LucaColombi check the issue #189, It is fixed for laravel 5.4 as well! |
Hello, I have the same issue, with laravel 5.4, and roles was installed using require bican/roles:dev-master --dev Whoops, looks like something went wrong. (1/1) FatalErrorException Declaration of Illuminate\Database\Eloquent\Model::is() must be compatible with Bican\Roles\Contracts\HasRoleAndPermission::is($role, $all = false) in Is a clean installation of laravel 5.4 without add anythin more tan bican/roles. This is mi User.php File: |
sorry for the doble post (i can't find the edit button) this is the code of the file: |
while running romanbincan seed
here is my user model:
use Illuminate\Auth\Authenticatable;
use Bican\Roles\Traits\HasRoleAndPermission;
use Bican\Roles\Contracts\HasRoleAndPermission as HasRoleAndPermissions;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
use Illuminate\Auth\Passwords\CanResetPassword;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Notifications\Notifiable;
class User extends Model implements AuthenticatableContract, CanResetPasswordContract, HasRoleAndPermissions
{
use Authenticatable, CanResetPassword, HasRoleAndPermission, Notifiable;
The text was updated successfully, but these errors were encountered: