0
のボタンからコントローラします通過アレイはyii2
public function actionFollow($id)
{
$model = Followusers::findOne($id);
return $this->render('follow', [
'model' => $model, 'id' => $id,
]);
ビュー/ follow.php
Yii::$app->db->createCommand()
->insert('followusers', [
'follower' => $id[0],
'followed' => $id[1],
])->execute();
Yii::$app->response->redirect(['user/view1','id' => $id[1]]);
}
は$ follower1または$ followed1は10が割り当てられているときにのみ、私は実際に行われ
を行うべきであるURLにパラメータを渡しながら、間違い。 ?> "これを取得した結果を教えてください...私はURLが生成されているのが好きです.. – scaisEdge
http://localhost/series/index.php?r = followusers/follow&id = 210 // here $ follower = 2 $は= 10 –