Skip to content

Commit

Permalink
Merge pull request #72 from nowendwell/patch-1
Browse files Browse the repository at this point in the history
Updating to Laravel 6
  • Loading branch information
mattstauffer authored Sep 6, 2019
2 parents f567c0d + d44231d commit 43836d3
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 4 deletions.
47 changes: 43 additions & 4 deletions lambo
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ showhelp()
echo "${green} -s, --secure${reset} Generate and use https with Valet"
echo "${green} --dbuser${reset} Specify the database user"
echo "${green} --dbpassword${reset} Specify the database password"
echo "${green} --vue${reset} Specify Vue as the frontend"
echo "${green} --bootstrap${reset} Specify Bootstrap as the frontend"
echo "${green} --react${reset} Specify React as the frontend"
quit
}

Expand Down Expand Up @@ -81,6 +84,7 @@ NODE=false
CODEEDITOR=""
BROWSER=""
LINK=false
FRONTEND="vue"
DB_USERNAME="root"
DB_PASSWORD=""' > ~/.lambo/config

Expand Down Expand Up @@ -164,6 +168,10 @@ quit()
exit 0
}

ui_package_exists() {
composer show | grep laravel/ui >/dev/null
}



## Set up error handling
Expand All @@ -179,6 +187,7 @@ AUTH=false
NODE=false
CODEEDITOR=""
BROWSER=""
FRONTEND="vue"
DB_USERNAME="root"
DB_PASSWORD=""
if [[ -f ~/.config/valet/config.json ]]; then
Expand Down Expand Up @@ -267,6 +276,18 @@ while [[ $# -gt 0 ]]; do
DB_PASSWORD="$2"
shift
;;
--vue)
FRONTEND="vue"
shift
;;
--bootstrap)
FRONTEND="bootstrap"
shift
;;
--react)
FRONTEND="react"
shift
;;
*)
;;
esac
Expand Down Expand Up @@ -316,6 +337,28 @@ if [[ "$CODEEDITOR" != "" ]]; then
fi
fi

if [[ "$FRONTEND" != "" ]]; then
composer require laravel/ui
if [[ "$FRONTEND" = "bootstrap" ]]; then
php artisan ui bootstrap
fi
if [[ "$FRONTEND" = "vue" ]]; then
php artisan ui vue
fi
if [[ "$FRONTEND" = "react" ]]; then
php artisan ui react
fi
fi

if [[ "$AUTH" = true ]]; then
# check to see if the ui package is already included
if ! ui_package_exists; then
composer require laravel/ui
fi

php artisan ui:auth
fi

if [[ "$NODE" = true ]]; then
echo "
${green}Installing NPM dependencies...${reset}
Expand All @@ -328,10 +371,6 @@ ${green}Installing NPM dependencies...${reset}
fi
fi

if [[ "$AUTH" = true ]]; then
php artisan make:auth
fi

# Update .env.example to point to this database with `root` username and blank pw,
# like Mac MySQL defaults, and appropriate domain

Expand Down
24 changes: 24 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,16 @@ Super-powered `laravel new` for Laravel and Valet.

## Installation

### For Laravel >= 6
```bash
composer global require tightenco/lambo
```

### For Laravel 5.*
```bash
composer global require tightenco/lambo:"^0.4.7"
```

## Upgrading

```bash
Expand Down Expand Up @@ -104,6 +110,24 @@ There are also a few optional behaviors based on the parameters you pass (or def
```bash
lambo superApplication --secure
```

- `--vue` to set the frontend to the default Laravel 5.* scaffolding (set by default)

```bash
lambo superApplication --vue
```

- `--bootstrap` to set the frontend to Bootstrap

```bash
lambo superApplication --bootstrap
```

- `--react` to set the frontend to React

```bash
lambo superApplication --react
```

### Commands

Expand Down

0 comments on commit 43836d3

Please sign in to comment.