Command “tinker” is not defined

本小妞迷上赌 提交于 2019-12-05 21:41:10

If your project is earlier to Laravel 5.4. As sicne laravel 5.4 tinker comes as default with Laravel project

Step 1 : Install tinker

composer require laravel/tinker

Step 2 : Add provider class name into /config/app.php file

If you open the config/app.php file included with Laravel, you will see a providers array.

providers' => [     .
                    .
                    App\Providers\CountdownTimersServiceProvider::class,
                    Laravel\Tinker\TinkerServiceProvider::class

],

Install Tinker:

composer require "laravel/tinker". Then set the providers under config/app.php like that: 'providers' => [ ... ... Laravel\Tinker\TinkerServiceProvider::class, ],

I ran into this on a production server, but not with the very same code in my development environment. Turns out that I had my configuration (and routes) cached on the server and that regenerating the configuration cache made the tinker command suddenly show up again.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!