when I click the submit button of the form it is sending an ajax request to the server but it not saving the file here is my code in the controller(what am I missing in the action so that it saves the image) :
public function actionphoto(){
$model = Profile::findOne(Yii::$app->user->identity->getId());
$model->scenario='photo';
if(\Yii::$app->request->post() && $model->save()){
var_dump('Image Saved');
}
when I click the submit button of the form it is sending an ajax request to the server but it not saving the file here is my code in the controller(what am I missing in the action so that it saves the image) :
public function actionphoto(){ $model = Profile::findOne(Yii::$app->user->identity->getId()); $model->scenario='photo'; if(\Yii::$app->request->post() && $model->save()){ var_dump('Image Saved'); }