Learn laravel web from scratch (2)

The tragedy happened this time. I don’t know why I checked the information for a few hours and I didn’t solve it.


Is there any great god who can help to solve this problem, there is no way to play under Linux, but finally under Windows, under the same windows, I use the xampp integration package and also need to install composer under windows, I will not explain how to install it. Ah, in my opinion, the next step is just a fool-like installation. Finally, it needs to be configured in the environment variables and it can be used. Not much to say, let’s start directly.

The first is to create the project

Use cmd to enter the location you need to create, xampp is placed under the \xampp\htdocs\ folder by default, don’t want to change it, just put it under this

The same as when created under linux, by the way, explain laravel/laravel. This time the latest version is installed by default. If you don’t want to use the latest version, you can modify it to laravel/laravel = 5.2.* This will install the last version of 5.2.

It's best to use over the wall or just wait super slowly...

Unfortunately, all the circumvention tools have expired and the top-up results can’t open the webpage. I can only wait slowly. There is no other way to install a new vpn proxy. It’s pretty good.



The download speed is also very fast. Finally, if the set successfully appears, then congratulations to you that the installation was successful. Now we can turn off the cmd and recommend a development tool under windows, phpstorm or webstorm, which is pretty good. Edit under windows Now we use phpstorm to open the project we created and it is the same as in linux. I will not give you a screenshot.


This is the same structure as linux

You can use various commands here

Next, we still connect to the database and there is no change in Linux, so I won’t give you a screenshot.

After creating it, we will make a travel website


This is the database, let's create model and controller and view


After the creation is complete, we can see the created directory indicating that we have created it successfully

Since we do the back-end management system first, our back-end files are all under the admin folder. Similarly, under the view, we are also divided into front-end and back-end

After the creation is complete, let's first test whether the database link is successful

Laozi, first, create a route in route-》web.php


Similarly, we saw that the encoding was messed up and modified the character set of xampp in the same way

After the modification is completed, we get the data in the controller and output the result to see


We can click on the link, and the data is obtained. It’s time to have lunch for a whole morning. Nothing has been written and we have been doing repetitive work, so we really have to believe this sentence. To be good in advance, we must first sharpen our tools.

Guess you like

Origin blog.csdn.net/mzjmc123/article/details/75460151