Home / Snippets / How to Create Alias for Laravel Sail Command
How to Create Alias for Laravel Sail Command cover

How to Create Alias for Laravel Sail Command

757

2 years ago

0 comments

The typical way to call Laravel Sail command is by calling the full path which is very long.
./vendor/bin/sail up
So instead of calling it like above, you can alias it and name it "sail" which behind the scene it will call the "vendor/bin/sail" command.
alias sail='[ -f sail ] && sh sail || sh vendor/bin/sail'
Depending on the terminal/command line you are using, you can define these alias in your ~/.zshrc or ~/.bashrc config.
sail up
notion avatar

Alaz

Week-end developer currently experimenting with web, mobile, and all things programming.

Topics:

Frontend

Resource

Average

Average

Support Us

If you like our tutorial, support us by being our Patreon or buy us some coffee ☕️

Welcome to PostSrc V3

PostSrc Dark Logo

You have to login to favorite this