Example #1
0
 public function actionDelete($id)
 {
     $profileModel = Profile::findOne(['user_id' => $id]);
     $profileModel->delete();
     $authModel = Auth::findOne(['user_id' => $id]);
     $authModel->delete();
     $this->findModel($id)->delete();
     return $this->redirect(['index']);
 }