Laravel First lesson: Laravel Download and install, Laravel first lesson _php tutorial

Source: Internet
Author: User
Tags composer install

Laravel First lesson: Laravel Download and install, Laravel first lesson


Local installation laravel,php environment to be configured, it is recommended to xmapp a key to build.

1, the package directly from the official download, the official open source address: https://github.com/laravel/laravel (of course, you can also from this website: http://www.golaravel.com/download/download one-click installation package, Download it to see the page, not discussed here).

2, the unpacked folder to place the local environment directory, access to http://localhost/laravel/is inaccessible, laravel the starting page in the public directory, access to the following address to start.

http://localhost/laravel/public/, unfortunately, the error, such as, means that did not find the vendor directory autoload.php directory. Of course you can't find this file, because there is no.

3, next need to install composer (self-installation bar), run the command line, go to the Laravel directory, enter

Composer Install

commands, such as:

Wait for the installation to complete, the Wendor directory appears in the Laravel folder.

4, you find that you still cannot access, appeared two lines big "whoops, looks like something went wrong." This is because we did not turn on debug, so we do not see the error prompt.

Open the app.php of the Laravel\config directory, modify

' Debug ' = env (' App_debug ', false), for ' debug ' = ' env ' (' App_debug ', true),

We see the error message: ' No supported Encrypter found. The cipher and/or key length is invalid.

Don't worry, it's because we don't have the. env file configured. Locate the. Env.example in the Laravel directory to rename it. Env. If you are a window system, a hint will pop up

The workaround is simple: Save with Notepad and rename.

It is still inaccessible because the. Env App_key is not set. At the command line, enter:

PHP Artisan Key:generate

The. env file will automatically generate App_key, and the lazy way is to randomly engage a 32-character.

See the 'Laravel 5' in the characters to show that the installation was successful.

http://www.bkjia.com/PHPjc/1079205.html www.bkjia.com true http://www.bkjia.com/PHPjc/1079205.html techarticle laravel First lesson: Laravel Download and installation, Laravel first lesson Local installation laravel,php environment to configure, recommend Xmapp a key to build. 1, the package directly from the official download, the official ...

  • 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.