Skip to content

Instantly share code, notes, and snippets.

@vidux
Last active July 14, 2020 07:07
Show Gist options
  • Save vidux/a9b3af52ce0d173c4e24fca35dd2a4f8 to your computer and use it in GitHub Desktop.
Save vidux/a9b3af52ce0d173c4e24fca35dd2a4f8 to your computer and use it in GitHub Desktop.
Install Laravel in Mac

install composer

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === 'e5325b19b381bfd88ce90a5ddb7823406b2a38cff6bb704b0acc289a09c8128d4a8ce2bbafcd1fcbdc38666422fe2806') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php

after succress download

php -r "unlink('composer-setup.php');"

move to user folder to run globle

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

//if permmision error, run with sudo

install laravel installer

composer global require laravel/installer

it should work else if above give error then follow these steps

brew update
brew install [email protected]
brew link [email protected] --force

then,

composer global require laravel/installer

afters success you can create new project by laravel command. 'laravel new NewProject'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment