Answer the question
In order to leave comments, you need to log in
Yii2: how to accept only post requests for action?
Subject. GET requests work fine. I send a post request - a 404 is issued.
Answer the question
In order to leave comments, you need to log in
Perhaps you are using action parameters that only work for GET requests
www.yiiframework.com/doc-2.0/guide-structure-contr...
Actually, there is a wonderful thing in Yii2 like filters. You need a VerbFilter. Smoke manuals here: www.yiiframework.com/doc-2.0/yii-filters-verbfilte...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question