3

I am trying to create a laravel package and it requires a level of abstraction where user of the package is ment to input an API key. So i made an API KEY field in the .env, with a config file of course..

my question is, is it possible to append your custom env fields automatically when someone composer-requires your package to his/her existing env file..

Or do i just have to specify the custom fields in my packages documentation

Gabe
  • 136
  • 2
  • 11
  • 1
    Does this answer your question? [Composer unable to run post install script](https://stackoverflow.com/questions/33550138/composer-unable-to-run-post-install-script) – nice_dev May 09 '21 at 11:09
  • 2
    You can check [`this`](https://getcomposer.org/doc/articles/scripts.md) doc too. – nice_dev May 09 '21 at 11:10
  • thanks @nice_dev, i went through doc, does this script "@putenv VARIABLE=" add that variable name to the env file, – Gabe May 09 '21 at 16:57
  • so i found that this isnt possible at this time, will just have to promt the fields to be added in the .env file. thank you @nice_dev – Gabe May 11 '21 at 04:49

0 Answers0