DEV Community

Jérôme W
Jérôme W

Posted on • Edited on

4 3

How to start Laravel project with "sail up" instead of "./vendor/bin/sail up"

Image description

This tutorial explains how to create a shorcut in your terminal to allow you to start your Laravel project with sail up command instead of ./vendor/bin/sail up using .bashrc in MacOS.

There are only 2 little steps!

Before starting

First, you need to open your terminal. Simple, isn't ? 😂

Step 1

In your terminal, run this to open your .bash_profile file :



nano ~/.bash_profile


Enter fullscreen mode Exit fullscreen mode

And paste this :



if [ -r ~/.bashrc ]; then
   source ~/.bashrc
fi


Enter fullscreen mode Exit fullscreen mode

Exit and save the modification.

Step 2

Still in your terminal, run this to open your .bashrc file :



nano ~/.bashrc


Enter fullscreen mode Exit fullscreen mode

And paste this :



alias sail='bash vendor/bin/sail'


Enter fullscreen mode Exit fullscreen mode

Exit and save the modification.

The final word 💬

Here we go, you can now open any Laravel project using Sail and write the following command to start it :



sail up


Enter fullscreen mode Exit fullscreen mode

Personally, I'm using the Docker's detached mode to free my terminal and be able to use it directly. This consists of adding -d like this :



sail up -d


Enter fullscreen mode Exit fullscreen mode

❓ Notice that I showed 2 steps but depending on your OS environment, you could probably skip the step 1.

Thanks for reading this little tip, feel free to add a comment to share your opinions! 😀☕

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay