从5.3升级到5.4后,Laravel Tinker无法正常工作 [英] Laravel Tinker Not Working After Upgrading From 5.3 To 5.4

查看:173
本文介绍了从5.3升级到5.4后,Laravel Tinker无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近将Laravel 5.3升级到Laravel 5.4.我已经阅读了laravel提供的升级指南,一切看起来都不错.在我尝试运行Laravel Tinker之前,它不起作用.我已经遵循了专门针对Laravel Tinker部分的升级指南.

I recently upgrade Laravel 5.3 to Laravel 5.4. I had read the upgrade guide provided by the laravel, and everything looks good. Until I try to run the Laravel Tinker and it's not working. I already followed the upgrade guide specifically for Laravel Tinker part.

Laravel Tinker

Laravel Tinker

为了继续使用tinker Artisan命令,您还应该 安装laravel/tinker软件包:

In order to continue using the tinker Artisan command, you should also install the laravel/tinker package:

作曲家需要laravel/tinker

composer require laravel/tinker

一旦安装了软件包,您应该添加 Laravel \ Tinker \ TinkerServiceProvider :: class到提供者数组 您的config/app.php配置文件.

Once the package has been installed, you should add Laravel\Tinker\TinkerServiceProvider::class to the providers array in your config/app.php configuration file.

来源: https://laravel.com/docs/5.4/upgrade

这是我的config/app.php:

And here is my config/app.php :

'providers' => [

        /*
         * Laravel Framework Service Providers...
         */
        Laravel\Tinker\TinkerServiceProvider::class,

但是,当我运行命令"php artisan tinker"时,它说的是:

But then, when I ran the command "php artisan tinker", it says this:

 [Symfony\Component\Console\Exception\CommandNotFoundException]
  Command "tinker" is not defined.

有人曾经历过吗?

注意:其他工匠命令可以正常工作,我可以看到我的站点很好.

Note: other artisan command works perfectly and I can see my site just fine.

推荐答案

Laravel Tinker

为了继续使用tinker Artisan命令,您还应该安装laravel/tinker软件包:

In order to continue using the tinker Artisan command, you should also install the laravel/tinker package:

composer require laravel/tinker

一旦安装了软件包,您应该将Laravel\Tinker\TinkerServiceProvider::class添加到config/app.php配置文件中的providers数组中.

Once the package has been installed, you should add Laravel\Tinker\TinkerServiceProvider::class to the providers array in your config/app.php configuration file.

来源: https://laravel.com/docs/5.4/upgrade

这篇关于从5.3升级到5.4后,Laravel Tinker无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆