I am using Yii 2.0 framework , Can anyone help me to write insert query in the controller please, I am writing query like this, is this a proper query
$userId = \Yii::$app->user->identity->id;
$restId = \app\models\Restaurantbusiness::find()->select('restaurentID')->where(['userId' => $userId ])->one();
$restdetailId = $restId->restaurentID;
$restomenuID = Restomenu::find()->insert('restaurantBusiness_restaurentID')->where(['restaurantBusiness_restaurentID' => $restdetailId])->One();
please help me to write the correct insert query. Thanks in advance