P
P
Peppa Pig2015-09-04 14:15:45
Yii
Peppa Pig, 2015-09-04 14:15:45

How to make Az filter under request->get in Yii2?

Please tell me how to filter the az string received with GET
Yii::$app->request->get('mail');
The string is directly passed to the view and displayed there.
As an option to put Smarty, but maybe you can somehow use Yii2?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton, 2015-09-04
@kitty04

What are you going to filter from? In general, there is such a thing as Html::encode() if you need to use the string from the GET parameter in the form.

M
Maxim Timofeev, 2015-09-08
@webinar

so you have a request:
localhost/[email protected]
means the controller is triggered and the action, apparently named success-reg
in the controller:

public function actionSuccessReg($email){
return $this->render('вьюха', ['email'=>$email]);
}

everything in the view you have a variable containing email
If this is not what you need - describe in more detail, preferably with your code

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question