From 5f4a3fc7f0566a4c1f20dd9d6225e979f1ff9e36 Mon Sep 17 00:00:00 2001 From: judantus Date: Tue, 8 Mar 2016 22:00:38 +0100 Subject: [PATCH] Reference addition to auth model for L5.2 --- src/Bican/Roles/Traits/RoleHasRelations.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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(); + } } /**