We have a HTML form that want we to send to the server. Which sends a script tag like the following:
<div id="14871610107379120"><script type="text/JavaScript" src="https://www.aparat.com/embed/NIM3h?data[rnddiv]=14871610107379120&data[responsive]=yes"></script></div>
I then get an error about this:
MethodNotAllowedHttpException in RouteCollection.php line 218
How can I repair this error?
I guess this could be a problem with using PATCH method.
Since you are using a PATCH
method. I understand that you have to add an hidden field to your form view so that Laravel can understand that its a patch request and not others:
You can use one of these:
{{ method_field('PATCH') }}
Or this:
<input type="hidden" name="_method" value="PATCH">
But because its already a url, then you can add &_method=PATCH
to the url so you'll have:
<div id="14871610107379120"><script type="text/JavaScript" src="https://www.aparat.com/embed/NIM3h?data[rnddiv]=14871610107379120&data[responsive]=yes&_method=PATCH"></script></div>
Hope this helps :)
Note: If the answer I gave is the correct answer then this question is already answered here: MethodNotAllowedHttpException in RouteCollection.php line 219