Answer the question
In order to leave comments, you need to log in
how to use ajax in laravel?
Good evening everyone. I can't figure out a couple of things about ajax which is used with laravel.
1. There is a form: what action should it have, what should be the method, for example, I want to do update, what method should be? POST and write below {{ method_fiel('PUT') }}? Or no method at all? And what should be the button, with what type? they say that with a button, but in the examples I saw submit, who to believe?
2. In ajax itself, what should type be? POST?
3. In roots... if we put the url in ajax, which was specified in the root, and if we have an update method, then what type should it be? put? or post?
Thank you very much in advance.
Answer the question
In order to leave comments, you need to log in
>> for example, I want to do an update
and at least get it, it doesn't affect anything. (I'm lying, you can't transfer the file with a get-ohm)
do everything with the usual POST. all Laravel methods are from the evil one. forget put and divides
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question