laravel: config file name convention?
laravel, php
Solution
`foo.php`
Why specify `constants` at all? Convention I've generally seen is single word filenames. I think in general most 'config' type settings will be constant in an environment even if it is variable between environments.
Take a look at the aws/aws-sdk-php-laravel composer package as an example. That file is named `config.php` in the package, but gets published to `aws.php`.
rydurham/Sentinel is another popular package. It also only has a single-word filename.
Update
In the situation you describe in your comment, I would do something like this:
<?php // File: foo.php
return [
'sheep' => [
'clothing' => 'wool',
'chews_on' => 'cud',
],
'wolf' => [
'clothing' => 'fur',
'chews_on' => 'sheep',
],
];
And you can access both of those via `Config::get('foo.sheep')` and `Config::get('foo.wolf')`, respectively. When they're defined on the server, they're still 'on the server' so to speak. If you wish to release the values stored in `foo.sheep` to the public you can, and you can do so without also exposing `foo.wolf`.
Problem
`foo_constants.php` or `fooConstants.php`? It seems laravel would do some name conversion when you use `Config::get('...')`, which one do you use?