public function actionSavePhotoInfo() { $post = Yii::$app->request->post(); if ($post['cover'] == true) { Photo::changeAlbumCover($post['photo_id'], $post['album_id']); } Photo::changePhotoInfo($post['photo_id'], $post['photo_name'], $post['category'], $post['subcategory']); }