This is my RestAPi which i want to use to post data through react bt the end point doesnt do anything. Someone can help me

public function actionPlaceOrder()
{
Yii::$app->response->format = Response::FORMAT_JSON;

    $model = new Onlineorders();
    $model->load(Yii::$app->request->post());

    if ($model->save()) {
        return ['success' => true, 'order' => $model];
    } else {
        return ['success' => false, 'errors' => $model->errors];
    }
}