Skip to content

Instantly share code, notes, and snippets.

@JeffreyWay
Created May 8, 2013 18:02
Show Gist options
  • Star 56 You must be signed in to star a gist
  • Fork 22 You must be signed in to fork a gist
  • Save JeffreyWay/5542264 to your computer and use it in GitHub Desktop.
Save JeffreyWay/5542264 to your computer and use it in GitHub Desktop.
Laravel aliases
# laravel new-app
alias laravel="git clone -o laravel -b develop https://github.com/laravel/laravel.git"
alias artisan="php artisan"
alias migrate="php artisan migrate"
alias serve="php artisan serve"
alias dump="php artisan dump"
alias t="phpunit"
# Generators Package
alias g:c="php artisan generate:controller"
alias g:m="php artisan generate:model"
alias g:v="php artisan generate:view"
alias g:mig="php artisan generate:migration"
alias g:t="php artisan generate:test"
alias g:r="php artisan generate:resource"
alias g:s="php artisan generate:scaffold"
alias g:f="php artisan generate:form"
# Git
alias ga="git add"
alias gaa="git add ."
alias gc="git commit -m"
alias gp="git push"
alias gs="git status"
alias gl="git log"
@Reegan01
Copy link

Reegan01 commented Jul 4, 2017

I tried in my windows

>alias pa="php artisan"

'alias' is not recognized as an internal or external command,
operable program or batch file.

@vikas5914
Copy link

vikas5914 commented Jul 14, 2017

@Reegan01

Alias command is not for windows. Its for MacOS or Linux

@aalaap
Copy link

aalaap commented Aug 29, 2017

@Reegan01 on Windows, you could make a batch file called pa.cmd with this in it:

php artisan %*

and keep it in a folder within your system path. Then simply run pa serve or whatever you want and it should work.

You might want to look into using a *nix based dev environment. You can either use Ubuntu on Windows (that's possible with the new Windows 10 version), or a VM-based solution such as Scotch Box.

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