From 6e0de53c1fbba83e385fb5987f487efa8978e163 Mon Sep 17 00:00:00 2001 From: drkthunder02 Date: Mon, 5 Nov 2018 21:53:21 -0600 Subject: [PATCH] stuff --- app/User.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/User.php b/app/User.php index d5c6dd016..4a2e9cd19 100644 --- a/app/User.php +++ b/app/User.php @@ -48,8 +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) { - $charId = User::where('character_id')->get(); - $checks = DB::table('user_roles')->where('character_id', $charId)->get(); + $checks = User::roles()->get(); + //$charId = User::where('character_id')->get(); + //$checks = DB::table('user_roles')->where('character_id', $charId)->get(); foreach($checks as $check) { if($check['role'] == $role) { return true;