9

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?

Q-Y
  • 19
  • 1
  • 6
Jeremy French
  • 11,707
  • 6
  • 46
  • 71

1 Answers1

22

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.

Laurence
  • 58,936
  • 21
  • 171
  • 212