laravel

How to create Laravel project by using Valet

Step 1: Install environment
installation for Php 7.1
brew install homebrew/php/php71
or
installation for OS X install Php 7.1
curl -s https://php-osx.liip.ch/install.sh | bash -s 7.1

reference:
https://php-osx.liip.ch/

installation for Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install homebrew/php/php71
Update Homebrew
brew update

Composer

php -r "copy('https://getcomposer.org/installer', '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');"

install Valet

composer global require laravel/valet

install laravel installer
composer global require "laravel/installer"

Step 2: Add Path to Terminal
echo $PATH
for running valet & composer installation
export PATH=/usr/local/php5/bin:$PATH
export PATH=$PATH:$HOME/.composer/vendor/bin

Step 3: Build up project
valet install
Go to folder you want, we suggest use Code (~/ is user home directory)
create a folder code under “User/”
input cd ~/code in terminal
cd ~/code
tell the plugin that you want to use code as the working path so that app.dev runs the program.
valet park
create a laravel project, naming it as “app”
laravel new app
running “app”
ping app.dev
secure the local domains by using terminal
valet secure

Back
Copy link
Add to
Email
Facebook
Whatsapp
Gmail
More
Save
Like
Cancel