Quick and easy alias for Laravel
(Source/Credits: https://dev.to/elbugz/quick-and-easy-alias-for-laravel-4nba)
Are you tired of typing 'php artisan' every time you need to create a controller or clear some configuration cache? This alias will save you some keystrokes and make you happier.
title: Quick and easy alias for Laravel published: true description: Are you tired of typing 'php artisan' every time you need to create a controller or clear some configuration cache? This alias will save you some keystrokes and make you happier. tags: laravel, shortcuts, development
Alias for PHP ARTISAN
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:
bash
alias a="php artisan"
Save the file and load it for the current terminal profile with:
bash
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:
bash
php artisan view:clear
php artisan queue:restart
php artisan make:controller
You can now do:
bash
a view:clear
a queue:restart
a make:controller
Isn't that a blessing?
Comments section