I've got an issue when i try to generate docs from which include Entrust Role and Permission models (both inherited not from \Model or \Eloquent).
Error message i've got is:
[Symfony\Component\Debug\Exception\FatalErrorException]
Class name must be a valid object or a string
I might use ignore, but I also need Entrust models.
Any suggestions?
I have the same issue when using Entrust.
'model' => App\User::class,
add to config/auth.php
This is because there is no follow "Zizaco/entrust" "Laravel config format" Update
look:...vendor\zizaco\entrust\src\Entrust\Traits\EntrustRoleTrait.php line:49
public function users()
{
return $this->belongsToMany(Config::get('auth.model'), Config::get('entrust.role_user_table'),Config::get('entrust.role_foreign_key'),Config::get('entrust.user_foreign_key'));
// return $this->belongsToMany(Config::get('auth.model'), Config::get('entrust.role_user_table'));
}
"Config::get('auth.model')"!!!
Please update "auth.model" to "auth.providers.users.model" in EntrustRoleTrait.php line:49. After this minor change my code worked fine.
You can fixing it with add to config.php
~
'model' => App\Models\User::class
~
You need to change your User path.
@barryvdh the package only supports L5.* and workarounds are suggested, don't think there's more todo and vote for closing this issue :}
Most helpful comment
add to config/auth.php
This is because there is no follow "Zizaco/entrust" "Laravel config format" Update
look:...vendor\zizaco\entrust\src\Entrust\Traits\EntrustRoleTrait.php line:49
"Config::get('auth.model')"!!!