Skip to content

Commit

Permalink
Merge pull request #57 from ericvanjohnson/master
Browse files Browse the repository at this point in the history
Add a tinker command
  • Loading branch information
fideloper authored Jan 28, 2018
2 parents a5840e6 + 176c74a commit b1d9913
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ Here's a list of built-in helpers you can use. Any command not defined in the `v
./vessel artisan <cmd>
./vessel art <cmd> # "art" is a shortcut to "artisan"

# Run tinker REPL
./vessel tinker # "tinker" is a shortcut for "artisan tinker"

# Run phpunit tests
./vessel test

Expand Down
15 changes: 15 additions & 0 deletions docker-files/vessel
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,21 @@ if [ $# -gt 0 ]; then
./vendor/bin/phpunit "$@"
fi

# If "tinker" is used, drop into the REPL
# inside a new container
elif [ "$1" == "tinker" ] ; then
shift 1
if [ "$EXEC" == "yes" ]; then
$COMPOSE exec \
-u vessel \
app \
php artisan tinker
else
$COMPOSE run --rm \
app \
php artisan tinker
fi

# If "npm" is used, run npm
# from our node container
elif [ "$1" == "npm" ]; then
Expand Down

0 comments on commit b1d9913

Please sign in to comment.