M
M
Maybe_V2016-06-05 00:37:30
Yii
Maybe_V, 2016-06-05 00:37:30

How to fix the problem with namespace?

Used yii2 basicit before and had no problems!
But now you need to use it advanced, but there is a problem with it!
For some reason, an error occurs with namespace, the system simply does not see them!
index.php example in frontend:
2831cc8fe3db46038eb80b327efa66e0.png

How can I fix this?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
mitaichik, 2016-06-05
@mitaichik

Write not yii\helper but \yii\helper

A
Artem Soshnikov, 2016-06-05
@artem90

Given that you are writing in a storm, I would recommend removing the namespace from the class call.
Then you will have the class itself highlighted in yellow (as it is now on the screen), press alt-enter on it and import the class use block.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question