ranks of users

This commit is contained in:
2018-11-10 15:34:17 -06:00
parent 1de4dc509d
commit e2960cd237
2 changed files with 26 additions and 16 deletions
+9 -10
View File
@@ -46,16 +46,15 @@ class User extends Authenticatable
protected $guarded = [];
//Used in middleware to make sure a user is able to access many of the pages
public function hasRole($role)
{
$check = User::role()->get(['role']);
//dd($check);
if($check == $role) {
return true;
} else {
return false;
}
}
//public function hasRole($role)
//{
// $check = User::role()->get(['role']);
// if($check == $role) {
// return true;
// } else {
// return false;
// }
//}
public function getUserType() {
return User::where('user_type')->get();