Install Laravel – PHP web framework

Laravel is a php web framework which following the model–view–controller (MVC) architectural pattern. It is gaining more and more popularity nowadays.

Get and install composer

Goto ( Click download.

Run the following:

php -r "copy('', 'composer-setup.php');"
php -r "if (hash_file('SHA384', 'composer-setup.php') === '669656bab3166a7aff8a7506b8cb2d1c292f042046c5a994c43155c0be6190fa0355160742ab2e1c88d40d5be660b410') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"

This will install ‘composer.phar ‘ in the current directory.

Move that to bin folder to get it globally available as a command and rename it to composer

$ mv composer.phar /usr/local/bin/composer

Open new tab and Type

$ composer

Install Lareval

Using composer

$ composer create-project --prefer-dist laravel/laravel blog "5.4.*"

From laravel/laravel github repo OR via larval installer

$ laravel new blog
-bash: laravel: command not found

Install it:

$ composer global require "laravel/installer"

this makes it globally accessible

Make sure to place the $HOME/.composer/vendor/bin directory (or the equivalent directory for your OS) in your $PATH so the laravel executable can be located by your system.

Open ~/.bash_profile OR ~/.bashrc in Mac

and add the following line:

export PATH="$PATH:$HOME/.composer/vendor/bin"

save and exit

Open New tab type:

$ laravel
Laravel Installer 1.4.1
  command [options] [arguments]

Check Laravel version:

$ php artisan --version
Laravel Framework 5.4.27

You are ready to go!


Launch sublime text 3 from command line in mac

An executable file to open the sublime editor is already contained in Sublime directory. By default this is not added to your $PATH.

So add that executable file to one of the directory that included in $PATH.

$ ln -s /Applications/Sublime\ /usr/local/bin/sublime

Here ‘/usr/local/bin/’ is present in my $PATH

Then take sublime as following:

$ sublime ~/projects/my-app

Here ‘~/projects/my-app’ is your app path.

Create bootable usb drive of OSX from Mac OS

You can read the following document to get the clear picture:

Use mac’s createinstallmedia command. The format is given below.

$ sudo /Applications/Install\ macOS\ --volume |YOUR-USB-DRIVE-PATH-HERE| --applicationpath |DOT-APP-FILE-MACOS|

In My case the command will be as follows:

$ sudo /Applications/Install\ macOS\ --volume /Volumes/ABHI\'S/ --applicationpath /Applications/Install\ macOS\