skip to main content

Ryan Hettler

Laravel Aliases

December 2, 2014

Common Laravel Aliases that I recommend to speed up a web developer’s workflow on Laravel 4.2 projects while typing in a command line interface.

Typical Tasks

alias la:al="php artisan dump-autoload"
alias la:ls="php artisan list"
alias la:srv="php artisan serve"
alias la:rt="php artisan routes"
alias la:cc="php artisan cache:clear"
alias la:tk="php artisan tinker"


alias cmpr:al="composer dumpautoload"
alias cmpr:ins="composer install"
alias cmpr:up="composer update"

Migration and Database Seeding

alias mig="php artisan migrate"
alias mig:in="php artisan migrate:install"
alias mig:mk="php artisan migrate:make"
alias mig:pub="php artisan migrate:publish"
alias mig:rfrsh="php artisan migrate:refresh"
alias mig:rst="php artisan migrate:rst"
alias mig:rb="php artisan migrate:rollback"

alias seed="php artisan db:seed"
alias mig:sd="php artisan migrate:refresh --seed" # rollback migration, migrate, and seed

Laravel 4 Generator Aliases

alias g:m="php artisan generate:model" 
alias g:c="php artisan generate:controller" 
alias g:v="php artisan generate:view" 
alias g:s="php artisan generate:seed" 
alias g:mig="php artisan generate:migration" 
alias g:r="php artisan generate:resource"
alias g:p="php artisan generate:pivot"