diff --git a/app/User.php b/app/User.php index 7f4ecd5a9..2e098cef2 100644 --- a/app/User.php +++ b/app/User.php @@ -48,9 +48,9 @@ class User extends Authenticatable //Used in middleware to make sure a user is able to access many of the pages public function hasRole($role) { - $check = User::role()->get(); + $check = User::role()->get('role'); //dd($check); - if($check['role'] == $role) { + if($check == $role) { return true; } else { return false;