A simple artisan command to return the value for a given config key. Supports nested retrieval and object export.
You're probably thinking, "Why do I need this?". To be fair, you probably don't. However, there are a few cases where retrieving config values via a command can make life easier:
- Running Laravel in a serverless environment
- Running Laravel in a PaaS (Platform as a Service, ie: Heroku, etc)
In a typical self-hosted Laravel application, you can SSH into your server and run php artisan tinker, and then config($key).
This is not possible in serverless environment (Vapor), as there's no machine to SSH into. In a PaaS, it is usually possible, although can be a bit inconvenient.
If you have access to running commands for your Laravel application, simply run:
php artisan config:get KEYWhere KEY can be a dot notation config key value: database or database.connections.mysql, etc.
Please see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email security@ohseesoftware.com instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.
This package was generated using the Laravel Package Boilerplate.