-1
I am working with Laravel 8, but I am very new still in this framework, and I came across a problem that is a Ubmit button that only sends my request in the second click, in the first it just reloads the page, in the second it sends the request and executes the command normally. I’m developing an administrative panel system for service catalog. I don’t know what could be causing this, I’d be grateful if you could help me. Whenever I click on the "X" which is the delete button, it reloads the page and only works when I click again. Ah, detail, this canvas is the continuation of another. The first and second step is when I add a service to the bank, and the third is when I insert links into another table that is related, so when I finish the first two, I redirect to this page to be able to add as many links as necessary.
Here is my form:
The rest of the tag link <a>
has been cut but is not so important, it is only the variable that will display the link name.
Now this is my controller:
if not solve, test the attribute "onclick", do not remember if it is accepted by php, but it does not cost to try ;)
– Igor
I don’t understand how I’m going to apply this code to my controller, I’m not familiar with AJAX. And the
onclick
does not work for PHP.– Gildevan Pereira
you can see more about ajax in: AJAX
– Igor