Quick and easy alias for Laravel

elbugz profile image Greg Brown ・1 min read


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?

Posted on by:

elbugz profile

Greg Brown


I've been a developer for a long, long time. Professionally it's been more than two decades. Yet, I have also had a number of other jobs and stories. My latest journey was co-owning a bakery.


markdown guide