[Laravel] basic database operations of Laravel, laravel database. [Laravel] basic database operations of Laravel. find the program directory structure in the database configuration of laravel database [laravel] laravel. env file configuration basic
Laravel is the PHP Web development Framework (PHP Web framework). It frees you from messy code, it helps you build a perfect web app, and every line of code can be concise and expressive. So, how does the Laravel framework operate the database?
1. Connection query (join)
A join query refers to a query that associates two or more tables together to obtain data that matches rows from another table. Common connection queries include internal connections (equivalent connections), left (outer)
Laravel's learning process from entry to output
This article mainly introduces the content about Laravel's process from entry to output, and shares it for your reference. I will not talk about it much below. Let's take a look at the detailed
Composer installation
Laravel uses composer to manage dependencies, so make sure the composer is already installed on the machine before using Laravel.
First, install the Lavarel installer via composer.
In the Windows environment, open cmd and enter
[Laravel] Laravel the database configurationLocate the. env file under the program directory structureTo configure basic database connection informationdb_host=127.0.0.1db_port=3306Db_database=blogDb_username=rootDb_password=rootYou need to restart
The answer comes from https://segmentfault.com/q/1010000007716945.First Floor:Go to https://packagist.org to search for the keywords you want, such as checkingdebugbarThe list has a description, in fact, can be seen at a glance
1, connect the database
Laravel The database configuration file is config/database.php, open the file, the default content is as follows:
return [Default return result set to PHP object instance' Fetch ' => pdo::fetch_class,The default database
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.