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