Laravel Tinker
Laravel Tinker is a powerful REPL
Laravel Tinker is a powerful REPL(read-eval-print loop) for the Laravel framework. Tinker by default installed when you install Laravel.
May be if you wrongly removed the tinker, you can also install tinker manually using composer
composer require laravel/tinker
If you are looking Graphical UI, you can check this Tinkerwell
Usages of Tinker
Tinker allows you to interact with your entire Laravel application on the command line, including your Eloquent models, jobs, events, and more. To enter the Tinker environment, run the tinker Artisan command
php artisan tinker
Let's do with more examples of running real scenario, as early notes we did the blogs module.
Now we can consider the blog module as example here.
Running models using tinker
Record saved at database
At the same time you can call methods, events and controller using tinker
Fetch all data using Tinker
Comments
Post a Comment
Thank you :)