How can we set a flash message in yii2?
Answer / Kumud Singh
In Yii2, you can set a flash message using the $this->session or Yii::$app->session. Here's an example:
```php
Yii::$app->session->setFlash('success', 'Your message here.');
```
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the component, helper and why are they used, is there other way we can do same thing, what is better?
How to generate crud code?
What is yii?
Why use yii 2.0 framework?
List out some database related functions in yii?
How to install yii framework?
How to set default controller on yii project ?
Which php version is required to install yii 2.0?
What is active record(ar) in yii?
What are the steps to install yii2?
What is gii in yii 2.0?
what is meant by yii framework?