Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

bingvanmoorsel's avatar

Making php artisan alias in homestead

So Homestead comes with a nice file "aliases" which comes with some nice commands like:

alias ..="cd .." alias ...="cd ../.."

Which are loaded when you boot homestead and usable in my putty.

however id love to make a command alias art= "php artisan"

But when I boot my Homestead the command will use the global php and checks for artisan in the wrong place.

Anyone an idea how I can change this alias so it will check the current directory im in. or is this imposible?

0 likes
3 replies
michaeldyrynda's avatar

artisan isn't a global command, so you'll need to be in the same directory as the command in order for your alias to work.

bingvanmoorsel's avatar

thats what I mentioned in my problem, my question was:

Is there a way to create an alias that does work checking your current directory

Please or to participate in this conversation.