Yii::$app->request->baseUrl conflict with my namespace

In a view file,

I have

namespace app\models;

# I use namespace app\models so I dont have to do the following

# use app\models\Project;

# use app\models\Client;

# use app\models\Address;

$this->registerJsFile(Yii::$app->request->baseUrl.'/js/project-client.js',['depends' => [\frontend\assets\ChosenAsset::className()]]);

which give me

PHP Fatal Error – yii\base\ErrorException

Class 'app\models\Yii' not found

So I can not use namespace app\models in a view file at all ? Is it a bad practice to have a "namespace" in view file ?