Skip to content

Instantly share code, notes, and snippets.

@tnylea
Last active September 11, 2023 21:44
Show Gist options
  • Save tnylea/f2e775897c73230c6206eb0825701085 to your computer and use it in GitHub Desktop.
Save tnylea/f2e775897c73230c6206eb0825701085 to your computer and use it in GitHub Desktop.
SED command to automatically add absolute path to sqlite file in the .env
sed -i '' -e "s|^DB_DATABASE=.*|DB_DATABASE=$PWD/database/database.sqlite|" -e 's/^DB_CONNECTION=mysql/DB_CONNECTION=sqlite/' .env
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment