Laravel 5 Framework learning environment and configuration, LARAVEL5 Framework Environment _php Tutorial

Source: Internet
Author: User

Laravel 5 Framework learning environment and configuration, LARAVEL5 framework Environment


The. env file is a configuration file, including database configuration information, view config->database.php, connections contains all the database configuration, you can select the database to use in default. In the database configuration, the env (' db_host ', ' localhost ') is the information that reads the. env configuration file. The second parameter is a default parameter.

We use MySQL database to modify. ENV:

db_host=localhostdb_database=laraveldb_username=rootdb_password=

Create a laravel database in MySQL

Mysql-u Root CREATE DATABASE laravel

To view MySQL configuration:

  ' MySQL ' = [  ' driver '  = ' mysql ',  ' host ' = '   env ' (' db_host ', ' localhost '),  ' database ' = > env (' db_database ', ' Forge '),  ' username ' = env (' db_username ', ' Forge '),  ' password ' = env (' Db_ PASSWORD ', '),  ' charset '  = ' utf8 ',  ' collation ' = ' utf8_unicode_ci ',  ' prefix '  = ',  ' strict ' and '  = False,],

In the config subdirectory, all of the configuration files are included and viewed.

The above mentioned is the whole content of this article, I hope to be able to learn LARAVEL5 framework to help you.

http://www.bkjia.com/PHPjc/980215.html www.bkjia.com true http://www.bkjia.com/PHPjc/980215.html techarticle Laravel 5 Framework learning environment and configuration, LARAVEL5 Framework environment. env file is a configuration file, including database configuration information, view config-database.php, Connections contains the ...

  • 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.