Laravel Tutorial: laravel4 installation and getting started

Source: Internet
Author: User
Tags laravel tutorial
1. to install Composer, you first need to install Composer. Composer is a PHP dependency management tool, and Laravel framework is to use & amp; nbsp; Composer & amp; nbsp; for installation and dependency management. & Amp; nbsp; Note: (1)

1. install Composer
First, you need to install Composer. Composer is a PHP dependency management tool. the Laravel framework uses Composer for installation and dependency management.
Note:
(1) If an error occurs while installing Composer, enable php_openssl and php_fileinfo extension in php. ini because Laravel needs.
(2) during the installation process, select the php.exe location of your instance.
II. install Laravel
After the Composer installation is complete, run the following command on your website directory in cmd:

composer create-project laravel/laravel your-project-name

Composer automatically downloads and installs Laravel for you.

3. Deploy virtual hosts
For example, my project name is project:
 
  DocumentRoot "E:/www/project/public"ServerName laravel.devErrorLog "logs/laravel.log"CustomLog "logs/laravel.log" common
 

Of course, you also need to bind the domain name in your hosts:
127.0.0.1       laravel.dev

So far, the installation is complete:
4. implement Hello World
Print Hello World through routing and add the following in app/routes. php:
Route::get('test', function(){    return 'Hello World!';});

Because the Laravel template uses Blade, the Controller or view is introduced in the following tutorial!

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.