Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/beyondcode/nova-tinker-tool
Use the power of Tinker within your Nova application.
https://github.com/beyondcode/nova-tinker-tool
laravel nova tool
Last synced: 3 months ago
JSON representation
Use the power of Tinker within your Nova application.
- Host: GitHub
- URL: https://github.com/beyondcode/nova-tinker-tool
- Owner: beyondcode
- License: mit
- Archived: true
- Created: 2018-08-22T09:21:52.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2021-03-30T15:05:27.000Z (over 3 years ago)
- Last Synced: 2024-06-23T18:01:46.556Z (4 months ago)
- Topics: laravel, nova, tool
- Language: Vue
- Size: 1.1 MB
- Stars: 115
- Watchers: 3
- Forks: 10
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-laravel-nova - Nova Tinker Tool
README
# Nova Tinker Tool
[![Latest Version on Packagist](https://img.shields.io/packagist/v/beyondcode/nova-tinker-tool.svg?style=flat-square)](https://packagist.org/packages/beyondcode/nova-tinker-tool)
[![Total Downloads](https://img.shields.io/packagist/dt/beyondcode/nova-tinker-tool.svg?style=flat-square)](https://packagist.org/packages/beyondcode/nova-tinker-tool)Use the power of Tinker within your Nova application.
![tinker screenshot](https://beyondco.de/github/nova-tinker-tool/screenshot.png)
## Installation
You can install the package in to a Laravel app that uses [Nova](https://nova.laravel.com) via composer:
```bash
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`.
```php
// 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:
```bash
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
``` bash
composer test
```### Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.
## Contributing
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
### Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
## Credits
- [Marcel Pociot](https://github.com/mpociot)
- [All Contributors](../../contributors)## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.