inquid / yii2-tinker
Yii2 Tinker
Installs: 415
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 6
Type:yii2-extension
Requires
- php: >=5.4.0
- psy/psysh: 0.10.8 | 0.9.9
- symfony/var-dumper: ~5.0
- yiisoft/yii2: *
This package is auto-updated.
Last update: 2024-11-16 09:31:05 UTC
README
Inquid Improvements
Features
A console debugger like laravel artisan tinker
- REPL
- Powerful Dumper
Installation
composer require "luoxiaojun1992/yii2-tinker:*"
Configuration
Don't need any configuration.
If the command doesn't work, add the following configuration manually.
config/console.php
...
$config = [
...
'controllerMap' => [
...
'tinker' => [ // Tinker command line.
'class' => \Yii2Tinker\TinkerController::class,
],
...
],
...
];
...
Usage
execute ./yii tinker
in your application's root folder
Example:
Psy Shell v0.8.1 (PHP 7.0.14 — cli) by Justin Hileman
>>> Yii::$app->params['adminEmail']
=> "admin@example.com"
>>> dd([1=>'a', 2=>'b', 3=>'c'])
array:3 [
1 => "a"
2 => "b"
3 => "c"
]
>>>