: This article mainly introduces Laravel's first self-study course: laravel download and installation. if you are interested in the PHP Tutorial, refer to it. Install laravel locally and configure the php environment. we recommend setting up xmapp with one click.
1. download the package directly from the official website. official open-source address: https ://Github. Com/laravel (of course, you can also download the one-click installation package from this website: http://www.golaravel.com/download/, download it, you 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.
The installation is successful if you see the words 'laravel 5.
The above introduces Laravel's first course on self-study: laravel downloads and installation, including github content. if you are interested in the PHP Tutorial, please help.