Great video as usual! However, I have a question related to "touchedFields". It's defined as a normal variable and not as a ref() and still it works! Why would you choose a normal variable and not ref in this case? Thank you
I have a question, what if you were doing some process inside the store method and and error may occur, how do you handle this error? And if the data is stored successfully, how do you return a feedback to client side -something toast notification without page reload. Just like in axios where you can handle response and perhaps do something with the response.
I'm currently trying to learn laravel + vue + inertia. I have a question, is it just me or whenever I click back button after logging out, I can still access the previous page and submit some data?
I was wondering how to remake this without inertia. I am using laravel with vue 3 as a single-page application. For starters, I noticed there are inertia forms and the inertia route. I am using plain bootstrap forms and normal Axios for my request. Please help me out.
It should be possible without inertia. Most of the changes should revolve around making the request with axios and then store the errors we get back into a reactive object we then use to display the error messages. I'm thinking of doing a video on Laravel + Vue SPA sometimes in the future. If that will happen, I will make sure to include this topic as well 👍
@@cdruc Hey i did get the errors displayed but the issue is that it still does not flash the unwanted text input. function validate() { if (!needsValidation) return; needsValidation = false; try { method({ ...form, prevalidate: true }) } catch (e) { if (e.response.status === 422) { Object.keys(e).filter(field => !touchedFields.has(field)).forEach(field => delete e[field]); errors.value = e.response.data.errors } } } This is the validate composable. how else could i structure this?
I discovered this channel yesterday and I really enjoy your content. Thanks a lot.
Glad you enjoy it - hope you find the other videos useful as well! 😃
srssly love what you're doing right now
thx so much !!!!!!!
Oh, thanks! 😃
I always learn new things on your videos. Thanks for your videos.
Glad to hear you find them useful! 😀
Very clever !!! Thanks a lot Constantin, I have learned so much from you in order to progress from junior to intermediate developer. 🤩
You're very welcome! Good luck and never stop learning 👊!
@@cdruc 💪
Very clever point again!
Thanks for sharing about Inertia and diving into laravel code too 😊
Thanks! 😊
Thank you for the idea and amazing video! One suggestion though. Put only: ['errors'] to Inertia visit call.
Oh, nice catch! Thanks!
Nice! Nice! Nice! Very good job!
Great video as usual! However, I have a question related to "touchedFields". It's defined as a normal variable and not as a ref() and still it works! Why would you choose a normal variable and not ref in this case? Thank you
This is the first time I'm writing a comment here , I just want to say thank you so much for your amazing videos 🔥
My pleasure 😊
I have a question, what if you were doing some process inside the store method and and error may occur, how do you handle this error?
And if the data is stored successfully, how do you return a feedback to client side -something toast notification without page reload. Just like in axios where you can handle response and perhaps do something with the response.
I'm currently trying to learn laravel + vue + inertia. I have a question, is it just me or whenever I click back button after logging out, I can still access the previous page and submit some data?
best of luck
I was wondering how to remake this without inertia. I am using laravel with vue 3 as a single-page application. For starters, I noticed there are inertia forms and the inertia route. I am using plain bootstrap forms and normal Axios for my request. Please help me out.
It should be possible without inertia. Most of the changes should revolve around making the request with axios and then store the errors we get back into a reactive object we then use to display the error messages.
I'm thinking of doing a video on Laravel + Vue SPA sometimes in the future. If that will happen, I will make sure to include this topic as well 👍
@@cdruc Hey i did get the errors displayed but the issue is that it still does not flash the unwanted text input.
function validate() {
if (!needsValidation) return;
needsValidation = false;
try {
method({ ...form, prevalidate: true })
} catch (e) {
if (e.response.status === 422) {
Object.keys(e).filter(field => !touchedFields.has(field)).forEach(field => delete e[field]);
errors.value = e.response.data.errors
}
}
}
This is the validate composable. how else could i structure this?
j'ai une erreur 403