S
S
Space2015-09-28 14:45:34
PHP
Space, 2015-09-28 14:45:34

How to pass id to link in Yii2?

There is a controller with an action

public function actionDelete($id){
//... мой код
 return $this->render('delete',)
}

in which, as you can see, I pass id . I need that when I go to the /delete/2 link , for example, my code will work, but it gives me an error about a non-existent page ( there is a view , it gives an error even in return render ). Does something need to be written in behaviors or why does such an error occur?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
tigra, 2015-09-28
@tigroid3

maybe there is a view, but it is not where it needs to be?
If the controller is front, then the view should be in the front folder

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question