Download the PHP package gere-lajos/laravel-web-tinker without Composer
On this page you can find all versions of the php package gere-lajos/laravel-web-tinker. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download gere-lajos/laravel-web-tinker
More information about gere-lajos/laravel-web-tinker
Files in gere-lajos/laravel-web-tinker
Package laravel-web-tinker
Short Description Small Laravel package to use Tinker in your browser
License MIT
Homepage https://github.com/gere-lajos/laravel-web-tinker
Informations about the package laravel-web-tinker
NOTE
We have transitioned the ongoing development of this project to a new repository. You can access it at luminarix/laravel-web-tinker. Please note that this current repository will no longer receive updates.
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
- If you run the code with ctrl+enter or cmd+enter, the editor will also start a new line.
- History is shared between tabs, and is not cleared when you close the tab.
- Big outputs are not handled well, it can push the grid instead of breaking words.
- We must validate the stored code structure so it won't break the editor.
Installation
You can install the package via composer:
Next, you must publish the assets from this package by running this command.
Optionally, you can publish the config file of the package.
This is the content that will be published to config/web-tinker.php
If you previously installed Spatie's Web Tinker, you may have conflicts in the config file. You can safely remove the web-tinker.php
file from the config
directory.
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 \GereLajos\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.
Testing
Credits
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-web-tinker with dependencies
illuminate/contracts Version ^11.0||^10.0
laravel/framework Version ^11.0||^10.0
nesbot/carbon Version ^3.0||^2.63
spatie/laravel-package-tools Version ^1.16