Тёмный

Prevalidate forms in Laravel and InertiaJS applications 

cdruc
Подписаться 11 тыс.
Просмотров 2,9 тыс.
50% 1

Code snippets: tallpad.com/se...

Опубликовано:

 

29 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 24   
@matthieulabaune1766
@matthieulabaune1766 2 года назад
Very clever !!! Thanks a lot Constantin, I have learned so much from you in order to progress from junior to intermediate developer. 🤩
@cdruc
@cdruc Год назад
You're very welcome! Good luck and never stop learning 👊!
@matthieulabaune1766
@matthieulabaune1766 Год назад
@@cdruc 💪
@jameswong3388
@jameswong3388 2 года назад
srssly love what you're doing right now thx so much !!!!!!!
@cdruc
@cdruc 2 года назад
Oh, thanks! 😃
@jakjr98
@jakjr98 2 года назад
Nice! Nice! Nice! Very good job!
@bhaidar
@bhaidar Год назад
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
@kevinwakhisi7001
@kevinwakhisi7001 2 года назад
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.
@cdruc
@cdruc 2 года назад
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 👍
@kevinwakhisi7001
@kevinwakhisi7001 2 года назад
@@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?
@MrFixIt-le7rs
@MrFixIt-le7rs Год назад
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.
@SilVer-hu2ps
@SilVer-hu2ps 2 года назад
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?
@andersandersson3412
@andersandersson3412 2 года назад
Thank you for the idea and amazing video! One suggestion though. Put only: ['errors'] to Inertia visit call.
@cdruc
@cdruc 2 года назад
Oh, nice catch! Thanks!
@henochangemichaellonzokoff6036
@henochangemichaellonzokoff6036 2 года назад
j'ai une erreur 403
@Raihan004
@Raihan004 Год назад
best of luck
@mahmudsulemansheikhwunnam3580
@mahmudsulemansheikhwunnam3580 2 года назад
I discovered this channel yesterday and I really enjoy your content. Thanks a lot.
@cdruc
@cdruc 2 года назад
Glad you enjoy it - hope you find the other videos useful as well! 😃
@pascalraymond8424
@pascalraymond8424 2 года назад
Very clever point again! Thanks for sharing about Inertia and diving into laravel code too 😊
@cdruc
@cdruc 2 года назад
Thanks! 😊
@nadjinmalade8738
@nadjinmalade8738 2 года назад
I always learn new things on your videos. Thanks for your videos.
@cdruc
@cdruc 2 года назад
Glad to hear you find them useful! 😀
@empty7999
@empty7999 2 года назад
This is the first time I'm writing a comment here , I just want to say thank you so much for your amazing videos 🔥
@cdruc
@cdruc 2 года назад
My pleasure 😊
Далее
InertiaJS frontend validation using intus
12:09
Просмотров 3,3 тыс.
Inertia.js forms, modals, and SSR  - Jonathan Reinink
42:50
Почему?
00:22
Просмотров 177 тыс.
Laravel InertiaJS & Vue 3 toast notifications
18:50
Просмотров 14 тыс.
Effortless Vue.js Forms
9:36
Просмотров 3,9 тыс.
Vue Inertia + Laravel Course. 9/17: Form Submit
6:57
The Tools I Use to Build Products in Laravel
19:00
Просмотров 31 тыс.