DEV Community

Greg Brown
Greg Brown

Posted on

Quick and easy alias for Laravel


If you are on a Linux or Mac machine...

Open up your ~/.bash_profile with your favorite text editor and add the following line at the end of the file:

alias a="php artisan"

Save the file and load it for the current terminal profile with:

source ~/.bash_profile
  • - the next time you log onto a terminal window it should already be working

Lazy 'php artisan'

Now instead of typing in all those nasty characters 'php artisan' all you need to do is type a followed by your favorite command!

instead of typing:

php artisan view:clear
php artisan queue:restart
php artisan make:controller

You can now do:

a view:clear
a queue:restart
a make:controller

Isn't that a blessing?

Top comments (0)