Posts Learn Components Snippets Categories Tags Tools About
/

How to Create Alias for Laravel Sail Command

Simplify your Laravel Sail Command by Aliasing it with your command line and boost your workflow

Created on Sep 16, 2022

727 views

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

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

Load comments for How to Create Alias for Laravel Sail Command

)