Skip to content

Commit

Permalink
Add aliases for easy switching between PHP versions (#647)
Browse files Browse the repository at this point in the history
* Add aliases for easy switching between PHP versions

* Change order of aliases
  • Loading branch information
pascal08 authored and svpernova09 committed Aug 15, 2017
1 parent 9bb1241 commit 8309cd3
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
19 changes: 19 additions & 0 deletions resources/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ alias h='cd ~'
alias c='clear'
alias art=artisan

alias php56=php56
alias php70=php70
alias php71=php71

alias phpspec='vendor/bin/phpspec'
alias phpunit='vendor/bin/phpunit'
alias serve=serve-laravel
Expand All @@ -26,6 +30,21 @@ function dusk() {
php artisan dusk "$@"
}

function php56() {
sudo rm /usr/bin/php
sudo ln -s /usr/bin/php5.6 /usr/bin/php
}

function php70() {
sudo rm /usr/bin/php
sudo ln -s /usr/bin/php7.0 /usr/bin/php
}

function php71() {
sudo rm /usr/bin/php
sudo ln -s /usr/bin/php7.1 /usr/bin/php
}

function serve-apache() {
if [[ "$1" && "$2" ]]
then
Expand Down
19 changes: 19 additions & 0 deletions resources/localized/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ alias h='cd ~'
alias c='clear'
alias art=artisan

alias php56=php56
alias php70=php70
alias php71=php71

alias phpspec='vendor/bin/phpspec'
alias phpunit='vendor/bin/phpunit'
alias serve=serve-laravel
Expand All @@ -26,6 +30,21 @@ function dusk() {
php artisan dusk "$@"
}

function php56() {
sudo rm /usr/bin/php
sudo ln -s /usr/bin/php5.6 /usr/bin/php
}

function php70() {
sudo rm /usr/bin/php
sudo ln -s /usr/bin/php7.0 /usr/bin/php
}

function php71() {
sudo rm /usr/bin/php
sudo ln -s /usr/bin/php7.1 /usr/bin/php
}

function serve-apache() {
if [[ "$1" && "$2" ]]
then
Expand Down

0 comments on commit 8309cd3

Please sign in to comment.