public function isAdmin() { $role = \App\userRole::where('userID', $this->id)->get()->pluck('role')->toArray()[0]; if ($role == 'admin') { return true; } else { return false; } }