Creating URL
Old way (Yii 1.0 maybe??)
$url = Yii::$app->controller->createUrl(‘xx’);// your own url generation logic
New way (Yii 2.0 )
$url = \Yii::$app->getUrlManager()->createUrl(‘consignment/label’);
Creating controllers
Debugging (old skool)
Yii::info(“My message” , ‘scsdebug’);
Yii::warning(“this->consignment_date=” . $this->consignment_date , ‘scsdebug’);
Yii::warning(\DateTime::createFromFormat(‘d/m/Y’, $this->consignment_date) , ‘scsdebug’);