It depends on which of the functionality that you want. If you're looking for a 'copy' of Tinkerwell, I don't think there are any other alternatives without giving up some of the functionalities.
What are the alternatives of Tinkerwell?
Are there any cheaper or free options available that does the job like Tinkerwell?
I want some interface in which i can run code snippets and see quick results. For example, if I want to quickly check laravel collection methods or implement some small logic and see the outcome. It would be good to have an interface like tinkerwell to quickly experiment php/laravel code.
@snapey Thanks for the tip :) Direct link just to make it easier https://laravelplayground.com/#/
Can anyone point me to instructions for using Tinkerwell? Just bought it yesterday and it does weird crap like adding dozens of identical rows to my tables (just by moving my cursor around the commands? IDK); gets stuck on errors many commands above, doesn't allow me to retype and retry, no way to get past the error; no apparent way to step up thru previous commands like up-arrow in real Tinker; don't know how to clear screen. Cannot find any real instructions at their site. Their "tutorials" are junk. Thanks
Well, they issued me an immediate refund. Didn't even try to fix/explain the issues I raised. ?? Very disappointed. Seemed like a super good idea.
It works well. Your experience is unusual.
I don't see how it could insert rows into your database unless you had code in tinkerwell to do this?
i'm creating a desktop app like tinkerwell, called tinkerun
hopes it can help you
Hi, I created small php script to create something like Tinkerwell
https://lazerg.notion.site/Create-a-simple-WebTinker-82d67e1127b8463787403d6de3857a06
Benefits
- Always free :)
- Run code in your favourite IDE (it means use benefits of your IDE)
- Runs inside of vendor folder without package, it means do not commit anything extra
@lazerg That gist is no longer accessible. Can you repost it?
- Create
vendor/_tinkerfolder - Put
index.phpandTinker.phpfile there. - Run
php -S localhost:3030 -t "vendor/_tinker"in root project folder.
vendor/_tinker/index.php :
<?php
define('LARAVEL_START', microtime(true));
// Composer autoload
require __DIR__ . '/../autoload.php';
// Bootstrap Laravel
$app = require_once __DIR__ . '/../../bootstrap/app.php';
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
// Handle the request
$kernel->handle(
$request = Illuminate\Http\Request::capture()
);
// Tinker
$tinker_start = microtime(true);
require 'Tinker.php';
Tinker::tinker();
$tinker_end = microtime(true);
$duration = round(($tinker_end - $tinker_start) * 1000, 2);
$duration_laravel = round(($tinker_end - LARAVEL_START) * 1000, 2);
// Prepare the response
$date = now()->toDateTimeString();
$message = "Tinker ran at {$date} in {$duration}ms ({$duration_laravel}ms in total)";
$response = response('<hr><code>' . $message . '</code>');
$response->send();
// Terminate the application
$kernel->terminate($request, $response);
vendor/_tinker/Tinker.php :
<?php
class Tinker
{
public static function tinker(): void
{
dump('Hello World');
collect([
'dog',
'cat',
'bird',
'fish',
])
->map(fn($animal) => ucfirst($animal))
->dump();
}
}
Now you can edit from Tinker class and then go to localhost:3030 to check/run
In case anyone is still wondering about this, there is a free PHPStorm plugin called Laravel Tinker. It works great and does most of the things you need.
Please or to participate in this conversation.