Artisan command says : Dotenv values containing sp

2020-05-30 03:42发布

I'm trying to know the list of artisan command by using php artisan list . and the command return me the following error [Dotenv\Exception\InvalidFileException] Dotenv values containing spaces must be surrounded by quotes. What is wrong?

Thanks in advance.

5条回答
劫难
2楼-- · 2020-05-30 03:54

Make sure that:

  • all variables with spaces are surrounded by quotes
  • there are no semi-colons
查看更多
啃猪蹄的小仙女
3楼-- · 2020-05-30 04:03

Verify your .env file. You need to check for the following:

  • Any extra or non-needed spaces
  • If you have any strings with spaces, make sure to surround them in quotes

Example:

varaible=123 Test

Needs to be

varaible="123 Test"
查看更多
够拽才男人
4楼-- · 2020-05-30 04:05

You should remove all spaces from .env file to make an app work again.

If you have to use spaces, instead of this:

VAR=some data

Use quotes:

VAR="some data"
查看更多
聊天终结者
5楼-- · 2020-05-30 04:05

First check env.

If your var value with space so check value in double quotes. like,

 MAIL_FROM_NAME="Sarvajanik School"

If you use single quotes then the possible to got this error containing spaces must be surrounded by quotes

查看更多
一纸荒年 Trace。
6楼-- · 2020-05-30 04:15

if you use two word for username or database name in .env,put it inside a double quotation.

example

查看更多
登录 后发表回答