im trying to write an extension that works will depend on the environment. How to retrieve the name of the current environment inside the extension class? What is best practices?
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- Can php detect if javascript is on or not?
- Using similar_text and strpos together
You'll have to inject the parameter in your extension constructor.
Either, you may refer to current envinroment in twig templates as
app.environment
.