Re-read https://laravel.com/docs/7.x/packages#configuration An example shows:
its values may be accessed like any other configuration file:
$value = config('courier.option');
No mention of
=> env(........
is in the chapter.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I am creating a package with config file messenger.php
I'm trying to access a variable inside messenger.php in a class of the package
return [
'default' => env('DEFAULT_MESSENGER_DRIVER', 'longcode'),
];
When trying to access messenger.default it's not working because for some reason php appended and have to do messenger.php.default to make it work.
Why is this happening?
Please or to participate in this conversation.