Today we released version v1.7.0 of laravel/vapor-cli
. This release includes a new tinker
command. Using the new command, you can execute code on Vapor using Laravel Tinker:
vapor tinker --code="dump(App\User::find(1))"
If you do not provide the --code
option, the tinker
command will prompt you for the code you wish to execute.
You may also run the command against a specific enviornment:
vapor tinker production
By default, this command will timeout after one minute. You can configure the timeout of your CLI commands using the cli-timeout
option within your vapor.yml
file.
To use this command, you need to make sure you have laravel/tinker
v2.0 or later installed in your project, as well as laravel/vapor-cli
v1.7.0 or later. After you update your dependencies, deploy your application.