Closed Pa6 closed 8 years ago
Did that work before on Laravel 5.2 ? Did you try this: #189 ?
Yes he same code on laravel 5.2 works, but on this new version nop
@Pa6 Did you try this: #189 ?
yes I tried also but no change @nikolaynesov
@Pa6 sorry I was not able to reproduce your error with my recent pull request #189 but maybe if someone else will report or confirm the issue we can come back to it again. Thank you for your effort.
I had the same error, and #189 seems to have fixed it for me.
@Pa6 Are you still experiencing this error today? @blakeage it fixed the issue for me too. @emiliomedina21 should have fixed it in his recent commits and they are included in #189 Anybody else experiencing the same issue?
@Pa6 Please review #189 (method is() has conflicts with Model::is() ). It was fixed.
@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 This is the displayed exception:
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 User.php (line 14)
Is a clean installation of laravel 5.4 without add anythin more tan bican/roles. This is mi User.php File:
<?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; use HasRoleAndPermission;
What I have to do to fix it?
thanks.
sorry for the doble post (i can't find the edit button) this is the code of the file:
<?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; use HasRoleAndPermission; ...
What i have to fix it? thankx :P
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;