Question: yii2 how to get post data?
Answer: As was already stated you can either use $_POST or the request -object. That object encompasses everything that enters your application on startup. So yes, \Yii::$app->request->post() gives you all incoming POST-data and \Yii::$app->request->post('name') will give you a single one. Same with the get function.