All individual subscriptions are 50% off this week only!

schroedermatthias
1 year ago
155
2
Laravel

Where to store a json configuration file in the codebase?

Posted 1 year ago by schroedermatthias

Hi,

when dealing with the Google API, you need files like client_secret.json for configuring the API client. Unfortunately the API client needs this file to work, there is no chance of putting the values in config/services.php and json_enconde()-ing them.

Where would you put files like this?

/config

/resources

/storage

Is there some kind of convention? In /config it would make sense, but it feels a bit messy, because there are only *.php files that belong to / can be read by the framework.

Thanks for your suggestions :)

Matthias

Please sign in or create an account to participate in this conversation.