It Doesn't work in Laravel 5.3+ if you want to try to access the value from the controller like below. It always returns null
<?php
$value = env('MY_VALUE', 'default_value');
SOLUTION: Rather, you need to create a file in the configuration folder, say values.php and then write the code like below
<?php
return [
'myvalue' => env('MY_VALUE',null),
// Add other values as you wish
Then access the value in your controller with the following code
<?php
$value = \Config::get('values.myvalue')
Where "values" is the filename followed by the key "myvalue".