I was wondering if it was possible to add .env variable for the indices area in the scout.php file?

I added this to my .env file


Then this to my scout.php


To replace


Which is my Prod indices. It did not work.

  • Try: \rias\scout\ScoutIndex::create(getenv('SCOUT_INDICES'))
    – Brad Bell
    Apr 8 '20 at 21:04
  • Thank YOU!!! That Worked!
    – JBrew30
    Apr 8 '20 at 21:34

If you use this, it should work:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.