Method Not Allowed. This url can only handle the following request methods: POST.
The reason for the error is clear to me, but someone knows tell me how to generate a link or url with the POST method instead of GET, the widget menu between the various items I have one
Your other layout probably does not include the yii\web\YiiAsset in the asset bundle loaded with the view.
Note: the data-method attribute is validated via yii’s custom javascript/jquery routine. From the api docs:
If the attribute exists, the method will submit the form containing this element. If there is no form, a form will be created and submitted using the method given by this attribute value (e.g. "post", "put"). For hyperlinks, the form action will take the value of the "href" attribute of the link. For other elements, either the containing form action or the current page URL will be used as the form action URL.
Is there another way to get the same result without hard-coding the [size="2"]"[/size]data-method[size="2"]"[/size] [size="2"]attribute[/size][size="2"] or make changes to the Menu.php widget[/size][size="2"]?[/size]