0

Hi I'm new to this team development. If I add .env file everything works fine but if I remove it there is an error The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths.. How to make it work? Thank you

Rbex
  • 1,519
  • 6
  • 24
  • 50

1 Answers1

2

Your .env file (or your environment) need to have an APP_KEY variable, which Laravel uses for encryption. You can generate a key with php artisan key:generate --show.

Dwight
  • 12,120
  • 6
  • 51
  • 64
  • I mean If remove the .env it doesn't work. I have .env and .env.dev – Rbex Apr 07 '17 at 04:22
  • and My team is .env.dev. I need to delete the .env – Rbex Apr 07 '17 at 04:23
  • 1
    You don't remove the `.env` file, that is the environment file and is necessary. Typically you will have the `.env.example` file committed to your source control, and use that to create the `.env` file for the different environments. – Jacob Lambert Apr 07 '17 at 05:13
  • 1
    If you want special Dev settings and Production setting then you can have two different `.env` files one for production with live credentials and one for Development with test credentials, and you can add comments also in `.env` file check [here](http://stackoverflow.com/questions/32368016/how-to-comment-in-laravel-env-file) – Akshay Khale Apr 07 '17 at 05:53