Download the PHP package luminarix/laravel-web-tinker without Composer
On this page you can find all versions of the php package luminarix/laravel-web-tinker. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download luminarix/laravel-web-tinker
More information about luminarix/laravel-web-tinker
Files in luminarix/laravel-web-tinker
Package laravel-web-tinker
Short Description Small Laravel package to use Tinker in your browser
License MIT
Homepage https://github.com/luminarix/laravel-web-tinker
Informations about the package laravel-web-tinker
Small Laravel package to use Tinker in your browser
This package allows you to use Tinker in your browser. Wildly inspired by Spatie's Laravel Web Tinker, but with added functionality, and React frontend.
🚨 A word to the wise 🚨
This package can run arbitrary code. Unless you know what you are doing, you should never install or use this in a production environment, or any environment where you handle real world data.
Known issues
- None. Please report any issues you find.
Requirements
- PHP ^8.3
- Laravel ^11.0
Extra features
- Tabs for multiple code snippets
- Tabs can be renamed
- Tabs have their own code history
- Both of the above are saved in local storage, so they persist between sessions and page reloads
- Runtime counter displayed while loading and total runtime displayed in the final output
- Loading state is displayed while the code is running
Installation
If you've used Spatie's Laravel Web Tinker before, please remove the config/web-tinker.php file before installing this package.
You can install the package via composer:
Publish the assets:
You can publish the config file with:
Optionally, you can publish the views using
Or if you want to publish everything at once, you can use
Usage
By default this package will only run in a local environment.
Visit /tinker
in your local environment of your app to view the tinker page.
Authorization
Should you want to run this in another environment (we do not recommend this), there are two steps you must perform.
-
You must register a
viewWebTinker
ability. A good place to do this is in theAuthServiceProvider
that ships with Laravel. - You must set the
enabled
variable in theweb-tinker
config file totrue
.
Modifying the output
You can modify the output of tinker by specifying an output modifier in the output_modifier
key of the web-tinker
config file. An output modifier is any class that implements \Luminarix\LaravelWebTinker\OutputModifiers\OutputModifier
.
This is how that interface looks like.
The default install of this package will use the PrefixDataTime
output modifier which prefixes the output from Tinker with the current date time and the run-time of the code.
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Credits
- Luminarix Labs
- Lajos Gere
- Márk Magyar
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-web-tinker with dependencies
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^11.0