Use the power of Tinker within your Nova application.
Clone or download
Latest commit d9738e9 Oct 4, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dist Initial commit Aug 22, 2018
resources Enhancement [#11]: Use Theme's icon color Oct 2, 2018
routes Initial commit Aug 22, 2018
src Initial commit Aug 22, 2018
.editorconfig Initial commit Aug 22, 2018
.gitignore Initial commit Aug 22, 2018
.scrutinizer.yml Initial commit Aug 22, 2018
.styleci.yml Initial commit Aug 22, 2018
.travis.yml Initial commit Aug 22, 2018
CHANGELOG.md Initial commit Aug 22, 2018
CONTRIBUTING.md Initial commit Aug 22, 2018
LICENSE.md Initial commit Aug 22, 2018
README.md Merge pull request #7 from ijpatricio/patch-1 Oct 4, 2018
composer.json Initial commit Aug 22, 2018
mix-manifest.json Initial commit Aug 22, 2018
package.json Initial commit Aug 22, 2018
phpunit.xml.dist Initial commit Aug 22, 2018
webpack.mix.js Initial commit Aug 22, 2018
yarn.lock Initial commit Aug 22, 2018

README.md

Nova Tinker Tool

Latest Version on Packagist Total Downloads

Use the power of Tinker within your Nova application.

tinker screenshot

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.