Laravel self-study Lesson 1: laravel download and assembly

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

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.