DEV Community

Greg Brown
Greg Brown

Posted on

3 1

Quick and easy alias for Laravel

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:

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?

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay