Feb 20, 2024
1
Level 6
How fixed Jetstream cache:clear on update?
I have this problem in the default component UpdateProfileInformationForm.vue when I update my profile name it will save the update in the database but the problem is the auth user name is still old in display and you need to run php artisan cache:clear to update the display
In the other component user management component there is no problem in displaying the updated data after update only on the default UpdateProfileInformationForm.vue
This is the script
const form = useForm({
_method: 'PUT',
name: props.user.name,
email: props.user.email,
photo: null,
});
const verificationLinkSent = ref(null);
const photoPreview = ref(null);
const photoInput = ref(null);
const updateProfileInformation = () => {
if (photoInput.value) {
form.photo = photoInput.value.files[0];
}
form.post(route('user-profile-information.update'), {
errorBag: 'updateProfileInformation',
preserveScroll: true,
onSuccess: () => clearPhotoFileInput(),
});
};
Please or to participate in this conversation.