public function user(?string $attribute = null)
    {
        if ($this->isGuest()) {
            return null;
        }

        $user = auth()->user();

        if ($attribute) {
            return $user->{$attribute};
        }

        return $user;
    }