beyondcode / nova-tinker-tool
Use Laravel tinker from Nova.
Installs: 196 609
Dependents: 1
Suggesters: 0
Security: 0
Stars: 117
Watchers: 1
Forks: 6
Open Issues: 18
Language:Vue
Requires
- php: >=7.1.0
- laravel/nova: *
- laravel/tinker: ^1.0|^2.0
- dev-master
- 1.1.0
- 1.0.0
- 0.0.1
- dev-dependabot/npm_and_yarn/y18n-3.2.2
- dev-dependabot/npm_and_yarn/elliptic-6.5.4
- dev-dependabot/npm_and_yarn/prismjs-1.23.0
- dev-dependabot/npm_and_yarn/ini-1.3.7
- dev-dependabot/npm_and_yarn/http-proxy-1.18.1
- dev-dependabot/npm_and_yarn/node-sass-4.14.1
- dev-dependabot/npm_and_yarn/lodash-4.17.19
- dev-dependabot/npm_and_yarn/websocket-extensions-0.1.4
- dev-dependabot/npm_and_yarn/fstream-1.0.12
- dev-dependabot/npm_and_yarn/mixin-deep-1.3.2
- dev-dependabot/npm_and_yarn/lodash.mergewith-4.6.2
This package is auto-updated.
Last update: 2021-04-30 15:24:41 UTC
README
Use the power of Tinker within your Nova application.
Installation
You can install the package in to a Laravel app that uses Nova via composer:
composer require beyondcode/nova-tinker-tool
Next up, you must register the tool with Nova. This is typically done in the tools
method of the NovaServiceProvider
.
// in app/Providers/NovaServiceProvider.php // ... public function tools() { return [ // ... new \Beyondcode\TinkerTool\Tinker(), ]; }
Usage
Click on the new "Tinker" menu item in your Nova application. You can enter any PHP code and press CMD+Enter / CTRL+Enter to evaluate the expression. The return value will be displayed below.
The previous code and output will be stored in the localstorage in case you want to execute the same code snippets multiple times.
Settings
By default this Pysh will attempt to write to ~/.pysh which for most will result in an error when trying to use tinker. To avoid this issue adding an environment variable to change where Pysh will write to will resolve this:
XDG_CONFIG_HOME=/path/to/new/location
Security: Remote Code Execution
This should only be used for development and testing. Running tinker allows arbitrary code to be executed.
Any executed php code will have the same access as the running php instance. This means that the running application may be altered, and if run with root privileges, one can get complete control of the machine.
Testing
composer test
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email marcel@beyondco.de instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.