Answer the question
In order to leave comments, you need to log in
How to refer to Symfony4 directory path correctly?
I don't understand what to do with getParameter. Where to define it?
Attempted to call an undefined method named "getParameter" of class "App\Controller\UserController".
vich_uploader:
mappings:
users:
uri_prefix: /images/users
upload_destination: '%kernel.project_dir%/public/images/users'
$file->move(
$this->getParameter('upload_destination'), -- ошибка
# '../public/images/users/', -- ок
$fileName
);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question