Open hailwood opened 3 years ago
Right now the plugin works great with laravel using env('SOMETHING').
env('SOMETHING')
However I like to create a second helper for when the app just won't run without an environment variable defined.
function env_or_throw($key, $default = null) { return env( $key, $default ?? fn() => throw new \Exception("Missing require environment variable '{$key}'.") ); }
It would be great if we could specify that env_or_throw or my_special_env_function was an env alias.
env_or_throw
my_special_env_function
env
Hi. Good idea. I'll try to make a setting for that.
And you gave a great idea for a new feature for Laravel Idea plugin :) Thanks
Right now the plugin works great with laravel using
env('SOMETHING')
.However I like to create a second helper for when the app just won't run without an environment variable defined.
It would be great if we could specify that
env_or_throw
ormy_special_env_function
was anenv
alias.