K
K
Konstantin Zhikhor2019-06-21 17:55:54
symfony
Konstantin Zhikhor, 2019-06-21 17:55:54

What is the error and why does it occur?

Why do I have such an error?
did not climb in system files

An exception has been thrown during the rendering of a template ("[Semantical Error] The annotation "@Route" in method App\Controller\CompanyController::index() was never imported. Did you maybe forget to add a "use" statement for this annotation? in /var/www/cp.dev/project/config/routes/../../src/Controller/ (which is being imported from "/var/www/cp.dev/project/config/ routes/annotations.yaml"). Make sure annotations are installed and enabled.").

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Koshelenko, 2019-06-21
@shevchenko__k

Add in controller:
use Symfony\Component\Routing\Annotation\Route;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question