I have some price lists that I can write, for easy maintenance, as arrays and use as a conf file, one per year.
I just wonder what would be the best place, semantically, to store these files :
Thanks for your advices
Configuration files live in the /config
directory. In your case, you can create a file at config/prices.php
, and access it using the global config
helper.
Given the following prices.php
config file:
<?php
return [
'cat' => 30,
'dog' => 20,
'owl' => 10
];
You can access the price of a cat using config('prices.cat')
.