0

I have developed a Laravel app locally and push the app to my server via GitHub Action. On the server, I still have to adapt the .env.template, as the .env does not belong in the repository.

Question: Do I have to regenerate the Laravel app key in production or staging or use the one from local? If not, I would also copy the key into the .env.template or .env exampel.

Maik Lowrey
  • 15,957
  • 6
  • 40
  • 79

1 Answers1

1

It is generally recommended to use a different application key in each environment (i.e., production, staging, and local) in Laravel.

This is because the application key is used to encrypt and decrypt sensitive data in your Laravel application, and using a different key in each environment can help prevent security issues and ensure that your data remains secure.

May
  • 51
  • 3