Yii – Sessions

  • Post author:
  • Post category:Yii
  • Post comments:1 Comment

Sessions make data accessible across various pages. A session creates a file on the server in a temporary directory where all session variables are stored. This data is available to…

Continue ReadingYii – Sessions

Yii – Validation

  • Post author:
  • Post category:Yii
  • Post comments:0 Comments

You should never trust the data received from users. To validate a model with user inputs, you should call yii\base\Model::validate() method. It returns a Boolean value if the validation succeeds. If there…

Continue ReadingYii – Validation

Yii – URL Routing

  • Post author:
  • Post category:Yii
  • Post comments:0 Comments

To change the default route of the application, you should configure the defaultRoute property. Step 1 − Modify the config/web.php file in the following way. <?php $params = require(__DIR__ . '/params.php'); $config = [ 'id'…

Continue ReadingYii – URL Routing