Add Laravel Tinker to PHPStorm
Laravel Tinker is artisan console command that allows developers to ‘tinker’ with Laravel code in real time.
To start Tinker, simple type:
php artisan tinker
You will then get a command prompt that allows you to interact with your Laravel Eloquent Models etc.
For example, you can do things like
$user = User::find(1);
and tinker will fetch the user record with an id of 1.
You then can type other Php code to interact with the $user variable. This can greatly aid developers for rapid application development.
Doing rapid application development using a console however, can be tiresome. Wouldn’t it be great if you could tinker with Laravel code right with in PhpStorms code editor? Well now you can
Check out the Laravel Tinker Plugin!
Once installed, access the Tinker console by pressing control-shift-t. Enter some code, and execute it by pressing control-shift-t again!
What a great improvement to the Terminal! Not only can the developer access copy and paste functionality of the editor but also, take advantage of PhpStorms code completion and inspections! How Cool!