1.3 Setting Up

Requirements

The Laravel framework has a few system requirements. You could use Laravel Homestead or manually satisfy the below requirements

  • PHP >= 5.6.4
  • OpenSSL PHP Extension
  • PDO PHP Extension
  • Mbstring PHP Extension
  • Tokenizer PHP Extension
  • XML PHP Extension

    Installing Laravel

    First, we download the Laravel installer using Composer:

    composer global require "laravel/installer"
    

    Once installed, the laravel new command will create a fresh Laravel installation in the directory you specify. For instance, laravel new my-awesome-site will create a directory named nmy-awesome-site containing a fresh Laravel installation with all of Laravel’s dependencies already installed:

    laravel new my-awesome-site
    

    Alternatively, you may also install Laravel by issuing the Composer create-project command:

    composer create-project --prefer-dist laravel/laravel my-awesome-site
    

Starting up

To start the server, just do

php artisan serve

and it will serve the site with the default php server You could also set it to listen to a particular port using the --port flag

php artisan serve --port=8080

If your stuck somewhere, you could refer to the Installation Documentation on laravel.com

Next Post »
1.4 Directory Structure
« Previous Post
1.2 About Laravel