Laravel self-study Lesson 1: laravel downloads and installs laravel locally. if the php environment needs to be configured, we recommend setting up the xmapp with one click. 1. download the package from the official website. The official open-source address is github. comlaravellaravel (of course, you can also use this website: www. golaravel. download the one-click installation package from comdownload and you will be able to see the page. Laravel teaches you how to download and install laravel.
Install laravel locally and configure the php environment. we recommend setting up xmapp with one click.
1, the package directly from the official download, the official open source address: https://github.com/laravel/laravel (of course, can also be from this site: http://www.golaravel.com/download/ download a key installation package, download it can see the page, here is not discussed ).
2. Place the decompressed folder in the local environment directory, and access http: // localhost/laravel/is inaccessible. laravel places the starting page in the public directory and access the following address.
Http: // localhost/laravel/public/. Unfortunately, an error is reported. for example, the autoload. php directory under the vendor directory is not found. Of course, you cannot find this file, because there is no such file.
3. install composer (install it on your own), run the command line, go to the laravel directory, and enter
Composer install
Command, such:
Wait until the installation is complete, and the laravel folder displays the wendor directory.
4. you find that you are still inaccessible. There are two lines of big "Whoops, looks like something went wrong .". This is because debug is not enabled, so no error prompt is displayed.
Open the app. php in the laravel \ config directory and modify
'Debug' => env ('app _ debug', false), 'debug' => env ('app _ debug', true ),
The error message 'No supported encrypter found. The cipher and/or key length are invalid. 'is displayed .'.
Don't worry, this is because we didn't configure the. env file. Find. env. example in the laravel directory and rename it. env. If you are a Windows system, a prompt is displayed.
The solution is simple: save it in Notepad and rename it.
Access is still unavailable because the app_key of. env is not set. On the command line, enter:
Php artisan key: generate
The. env file will automatically generate the app_key. the lazy method is to create a 32 character.
See'Laravel 5'The installation is successful.