diff --git a/src/Bican/Roles/Traits/RoleHasRelations.php b/src/Bican/Roles/Traits/RoleHasRelations.php index 16cc7c8..2f3b5ba 100644 --- a/src/Bican/Roles/Traits/RoleHasRelations.php +++ b/src/Bican/Roles/Traits/RoleHasRelations.php @@ -21,7 +21,12 @@ public function permissions() */ public function users() { - return $this->belongsToMany(config('auth.model'))->withTimestamps(); + if(isset(config('auth.model'))){ + return $this->belongsToMany(config('auth.model'))->withTimestamps(); + } + if(isset(config('auth.providers.users.model'))){ + return $this->belongsToMany(config('auth.providers.users.model'))->withTimestamps(); + } } /**