Skip to content

Instantly share code, notes, and snippets.

@jeystaats
Created July 19, 2017 20:07
Show Gist options
  • Save jeystaats/1f11e8a896694cfd5663cce187520a20 to your computer and use it in GitHub Desktop.
Save jeystaats/1f11e8a896694cfd5663cce187520a20 to your computer and use it in GitHub Desktop.
Valet URL to .env file automatically
#!/bin/bash
export var=`valet fetch-share-url`
sed -i -e "s@.*APP_URL.*@APP_URL=$var@" $result
echo "💪 - Valet share URL has been replaced 📋 "
@jeystaats
Copy link
Author

jeystaats commented Jul 19, 2017

Easily make this an alias profile by adding this to your bash profile

$ nano ./bash_profile 

Add to the bash profile the alias as following ( this has to redirect to where you have saved this valet-fetch script (!)

alias [commandname]="source ~/folder/.valet-fetch"

Save the nano by pressing ctrl+x , press Y and then Enter
Reload the bash file

source ~/.bash_profile

Now you can use it after you ran valet share by running the commandname

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