diff --git a/README.md b/README.md index 215a6b2..8079571 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,9 @@ Here's a list of built-in helpers you can use. Any command not defined in the `v ./vessel artisan ./vessel art # "art" is a shortcut to "artisan" +# Run tinker REPL +./vessel tinker # "tinker" is a shortcut for "artisan tinker" + # Run phpunit tests ./vessel test diff --git a/docker-files/vessel b/docker-files/vessel index b9cc679..6467244 100755 --- a/docker-files/vessel +++ b/docker-files/vessel @@ -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