Laravel self-study Lesson 1: laravel download and installation

Source: Internet
Author: User
Tags composer install
: 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.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.