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