Last active
May 21, 2019 12:37
-
-
Save stillfinder/b9c384d2d175dea286cbc2e42c9777b3 to your computer and use it in GitHub Desktop.
Create Laravel application
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
laravel new $1 | |
cd $1 | |
cp ../_ide_helper.php . | |
cp .env.example .env | |
composer install | |
yarn install | |
php artisan key:generate | |
mysql -uroot -e "CREATE DATABASE $1;" | |
sed -i -e 's/'"DB_DATABASE=homestead"'/'"DB_DATABASE=$1"'/g' .env | |
sed -i -e 's/'"DB_USERNAME=homestead"'/'"DB_USERNAME=root"'/g' .env | |
sed -i -e 's/'"DB_PASSWORD=secret"'/'"DB_PASSWORD="'/g' .env | |
touch README.md | |
git init | |
git add -A | |
git commit -m "Initial commit - $1" | |
open "http://$1.test" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment