I have put a couple of custom variables in my app/config/parameters.yml.
parameters:
api_pass: apipass
api_user: apiuser
I need to access these from my controller, and have tried to fetch them with
$this->get('api_user');
from within my controller file. When I try this, I get this error message:
You have requested a non-existent service "api_user".
What is the correct way to do this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…