Skip to content
Advertisement

How Can I define global CONST variables in Symfony framework?

How Can I define global CONST variables in my app symfony ? What are the good practices define global variables in symfony? Mayby Should I create interface and use DI ?

Advertisement

Answer

You should add your variables into app/config/config.yml;

JavaScript

And you can use it;

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement