DEV Community

Cover image for How to create your own alias for “php artisan” command on cmder
EJEH
EJEH

Posted on

3 1

How to create your own alias for “php artisan” command on cmder

If there is one out of many pain in the A** laravel developer faces especially when building laravel project is continuously typing php artisan command for almost laravel artisan command via terminal. This step also can be applied to any repeatable command you normally type when developing an application or working via terminal.

Lets get started:-

STEP 1

=> Get Cmder Download link or if you have Laragon already installed cmder comes preinstalled.

STEP 2

=> Go to your Laragon installation folder as for me, I install my laragon app at C:\laragon as shown below :-

Alt Text

STEP 3

=> To locate cmder goto C:\laragon\bin\cmder
Alt Text

STEP 4

=> To add an alias C:\laragon\bin\cmder\config
image

Locate a file user_aliases.cmd and open it.

Adding Aliases

You can add aliases using the alias command. Aliases added using the alias command will be immediately available and persist across Cmder sessions. For our case type pa=php artisan $* as shown below:-

image

After following all the steps above down to writing down all your aliases aka nickname or pseudo-name you can save your changes. Then open your cmder and type pa as shown below:-

Alt Text

Congratulation for solving one pain out of many you have when working with repeatable command on cmder.

Thanks for reading!

Remember the like

Any question? drop it at the comment box let see how we can resolve it....

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read more →

Top comments (1)

Collapse
 
felipealmeida28 profile image
Felipe Almeida

Thanks for sharing.

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more