Home  >  Article  >  Backend Development  >  Laravel study notes (1) Installation and configuration of development environment

Laravel study notes (1) Installation and configuration of development environment

WBOY
WBOYOriginal
2016-07-29 08:55:27870browse

Summary

Laravel's goal is to create a pleasant development process for developers without sacrificing application functionality. Happy developers create the best code! For this purpose, developers have concentrated on Laravel the advantages of numerous frameworks, which are even based on development languages ​​​​or tools such as Ruby on Rails, ASP.NET MVC, and Sinatra.

Preliminary understanding of Laravel

I have just been engaged in PHP development for a short time, and I know very little about some PHP frameworks. I saw an article on CSDN "PHP development framework popularity ranking: Laravel ranks first", and then I learned that there are Laravel is such a framework, and if the company wants to engage in Laravel development, it's time to learn about it. Then I searched a lot of information and learned what it was.

As for its detailed introduction, I won’t go into details. Just google it and you’ll find it.

Laravel environment construction

After you have a preliminary understanding, of course you have to start setting up the Laravel development environment on your own computer.

System environment requirements

  • PHP 5.3.7 or higher. If you don’t have a system and do not have a PHP environment installed, please download it from the following address: http://cn2.php.net/downloads.php
  • Have it on your computer web server, IIS, apache or other web server
  • MCrypt PHP extension

Install Composer

Laravel framework uses Composer (PHP package management tool, refer to Composer Chinese documentation) to manage code dependencies. On Windows operating systems, you can use Composer's Windows installation tool. Just install it directly after downloading. After installation, you can enter composer on the console to check whether the installation is successful.

Laravel study notes (1) Installation and configuration of development environment

Install Laravel

  • Download the latest version (currently 4.1) on Github: https://github.com/laravel/laravel/archive/master.zip
  • Extract the file to any location you want , for example, I unzipped it to the Laravel_site directory of my H drive
    Laravel study notes (1) Installation and configuration of development environment
  • The console enters the directory (Laravel_site), executes the command composer install, and then the program will download the necessary installation files. Make sure the network is smooth
    Laravel study notes (1) Installation and configuration of development environment
  • The installation is complete As shown below:
    Laravel study notes (1) Installation and configuration of development environment
  • Then observe that in the file directory, there is an additional vendor folder, and the composer.lock file has also been modified.

Of course there is another installation method, which is to directly download the complete installation package and unzip it. Download address: http://ci.laravel-cn.com/laravel.zip

Server configuration

The above operation is completed The last step is to configure the site on the web server. I believe that anyone with experience in website development can do these operations, so I will not introduce them in detail. One thing to note here is that when configuring the website, the root directory is public, so it is not Laravel_site. Once configured, run as follows:

Laravel study notes (1) Installation and configuration of development environment

The installation was successfully completed!

The above introduces the Laravel study notes (1) Installation and configuration of the development environment, including aspects of the content. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn