Jeremy French
Jeremy French

Reputation: 12157

Laravel environment specific package configuration

Laravel is pretty clear on how to set up environment specific config.

It also has a method for creating package configuration

What I have not been able to find is an example of creating environment specific package configuration. Is there a way to do this?

Upvotes: 9

Views: 2773

Answers (1)

Laurence
Laurence

Reputation: 60048

If your production app package config is here:

/app/config/packages/{name}/{package}/config.php

Then you just add an environment specific subfolder(s), same as you do for other configs:

/app/config/packages/{name}/{package}/local/config.php
/app/config/packages/{name}/{package}/testing/config.php

And just overwrite any production values with the specific environment variables you need.

Upvotes: 22

Related Questions