Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

samsoft's avatar

Where is 'php artisan tinker' in Lumen?

Please guyz, how do i install or enable tinker in Lumen?

0 likes
6 replies
jefkine's avatar

@samsoft You can use the following package: vluzrmos/tinker

  1. Use the composer require command to add the package
composer require vluzrmos/tinker
  1. Register it in the lumens application's service providers here: lumen\bootstrap\app.php
$app->register(Vluzrmos\Tinker\TinkerServiceProvider::class);
  1. Finally in your console:
php artisan tinker
2 likes
florenxe's avatar

seem not to have support for lumen5.5 yet

2 likes
gator's avatar

Simply:

composer require laravel/tinker

Then, in bootstrap/app.php

$app->register(Laravel\Tinker\TinkerServiceProvider::class);

Done!

6 likes
hpolthof's avatar

If you only want Tinker in development? Do the following:

composer require --dev laravel/tinker

And then add the following in bootstrap/app.php:

if (class_exists('Laravel\Tinker\TinkerServiceProvider')) {
    $app->register(Laravel\Tinker\TinkerServiceProvider::class);
}

Just my two cents.

10 likes

Please or to participate in this conversation.