diff --git a/frontend/modules/api/controllers/RegisterController.php b/frontend/modules/api/controllers/RegisterController.php new file mode 100644 index 0000000..fa5a403 --- /dev/null +++ b/frontend/modules/api/controllers/RegisterController.php @@ -0,0 +1,71 @@ +load(Yii::$app->getRequest()->getBodyParams(), '')) { + /** @var User $user */ + if ($user = $model->signup()) { + return [ + 'id' => $user->id, + ]; + } + } + + return null; + } +}