How to install Laravel 5.5

Server Requirements

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

Installing via Composer

To install Laravel via composer, first install composer from here https://getcomposer.org/download/ 

Then open terminal or cmd and insert  bellow command:

composer global require "laravel/installer"

after that to create a new laravel project:

laravel new myproject

or you can create project via composer create project

composer create-project --prefer-dist laravel/laravel myproject

Laravel URLs

For laravel nice urls you must edit your apache or nginx config files, to do that:

Apache .htaccess

Add bellow codes to your public/.htaccess file

Options +FollowSymLinks
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

Nginx

Edit your config file and add bellow codes:

location / {
    try_files $uri $uri/ /index.php?$query_string;
}

Leave a Reply

Your email address will not be published. Required fields are marked *