Support the ongoing development of Laravel.io →
posted 8 years ago
Configuration
Last updated 1 year ago.
0

Nobody?

0

You should place it in the config folder. Otherwise create a serviceprovider that publishes your config file to the config directory.

0

Not 100% sure, but I don't think you can call config on a file outside the config folder itself. How about storing your configuration variables inside the .env file? Then you could just make a providers.php file in the config folder, and reference the variables there.
.env

...
PAYPAL_USERNAME=xxx
PAYPAL_PASSWORD=xxx
PAYPAL_SIGNATURE=xxxx
...

config/providers.php

return array(
  'paypal' => [
    'username' => env('PAYPAL_USERNAME', 'xxx'),
    'password' => env('PAYPAL_PASSWORD', 'xxx'),
    ...
  ]
);
Last updated 8 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

wjohnw wjohnw Joined 14 Oct 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.