Artistic key error while trying to generate

Asked

Viewed 568 times

0

I pulled an example of a design of Lockable and when having give a php artisan generat:key he returns me the following mistake

 [Dotenv\Exception\InvalidFileException]
  Dotenv values containing spaces must be surrounded by quotes.

.env:

APP_NAME=Webchat ADMIN
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://localhost

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=webchat_admin
DB_USERNAME=root
DB_PASSWORD=

BROADCAST_DRIVER=redis
CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
  • place the contents of the file . env

1 answer

3


The command is misspelled, the correct form is as follows:

 php artisan key:generate

As described here at the installation of Laravel.

Another thing that may be happening is that in your file .env there are spaces in some word, for example.

VAR=algum texto

Words with space should be inside Quotes

VAR="algum texto"
  • keeps making the same mistake

  • You are running the command from the folder where your project is located?

  • yes I’m C: xampp htdocs webchat-admin

  • I edited the answer with something that might be happening

Browser other questions tagged

You are not signed in. Login or sign up in order to post.