Skip to content

Instantly share code, notes, and snippets.

@ervinne13
Last active August 27, 2023 13:24
Show Gist options
  • Save ervinne13/708b29a8aa196ab637bff6cbef37d119 to your computer and use it in GitHub Desktop.
Save ervinne13/708b29a8aa196ab637bff6cbef37d119 to your computer and use it in GitHub Desktop.
Sail Everywhere
#!/bin/bash
$PWD/vendor/bin/sail $@
@ervinne13
Copy link
Author

ervinne13 commented Jul 29, 2023

EZPZ make a global sail with:

sudo curl  https://gist.githubusercontent.com/ervinne13/708b29a8aa196ab637bff6cbef37d119/raw/c2eba33d2a0286954ebebbda5be766ac4978ea50/sail -o /usr/local/bin/sail
sudo chown $USER:$USER /usr/local/bin/sail
sudo chmod +x /usr/local/bin/sail

@ervinne13
Copy link
Author

Now as long as you're in a laravel folder with its dependencies installed, just execute:

sail up
sail bash

etc. directly without specifying ./vendor/bin/sail.

@ervinne13
Copy link
Author

For mac, just change the chown to just the user:

sudo curl  https://gist.githubusercontent.com/ervinne13/708b29a8aa196ab637bff6cbef37d119/raw/c2eba33d2a0286954ebebbda5be766ac4978ea50/sail -o /usr/local/bin/sail
sudo chown $USER /usr/local/bin/sail
sudo chmod +x /usr/local/bin/sail

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment