Laravel Run Error runtimeexception No application encryption key has been specified.

Source: Internet
Author: User
Tags root directory

① place the. env file in the project root directory

. env
App_name=laravel
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=homestead
db_ Username=homestead
db_password=secret

broadcast_driver=log
cache_driver=file
session_ Driver=file
session_lifetime=120
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

pusher_app_id=
pusher_app_key=
pusher_app_secret=

② run in project directory:

PHP Artisan Key:generate

The command generates App_key and writes to the. env file, re-run

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.