Level 70
@merklin It depends on what terminal you are using.
I think this can help you: https://stackoverflow.com/questions/58888190/how-can-i-create-own-alias-for-php-artisan-command-on-windows
Most people probably know this, but still, there is very little information on how to do this. Here is how I did it:
Microsoft.PowerShell_profile.ps1
Set-Alias -Name pa -Value php-artisan
Function php-artisan { php artisan $args}
pa => the short tag/command you will usephp-artisan => the function name. It MUST be the same on the second line after Function
{ php artisan $args } => the command to be executed, where $args allows you to add more arguments/options to the command. <path_to_file>
If your file is named Microsoft.PowerShell_profile.ps1 and is in the c:\documents, then run:
. c:\ documents\Microsoft.PowerShell_profile.ps1
IMPORTANT: DO NOT MISS the dot(.) in the beginning and the interval(space) after it!
You can take a look at my Gist what I use and download the file if you want to: https://gist.github.com/milenmk/fa8f6debe701147eca1372f70641d797
Please or to participate in this conversation.