php - How do I `use` a namespace in Yii and HAML? -
i'm using mthaml , yii. have following lines.
-use yii\helpers\url %a{:href => url::toroute(['shopping/ping', 'id' => (string)$item->productid, 'category' => (string)$item->primarycategory->categoryid])} test
however gives error.
syntax error, unexpected 'use' (t_use)
<?php function __mthamltemplate_65307eb071e28021db686cb46d491c8faae477235051858b05f212731637dd40($__variables) { extract($__variables); ?><?php use yii\helpers\url; ?>
Comments
Post a Comment