Set config var with metadata_url and call it from EarcUtils instead of env
This should fix the issue with metadata loading trough env MDX server URL.
It seems ENV variables can be read only by Laravel config files at startup time, and then you should access config variable through the config('app.varname') function.
To make it work I did:
- add a 'metadata_url' variable to app.php:
line 148: 'metadata_url' => env('METADATA_URL'),
- substitute the call to env('METADATA_URL') with config('app.metadata_url') in app/Libraries/EarcUtils.php
In the beginning it wasn't still working and that was because of the config cache, I cleared the cache with "php artisan config:clear" and bam! it finally started to work.