- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我最近将 Laravel 5.3 升级到 Laravel 5.4。我已经阅读了laravel提供的升级指南,一切看起来都不错。直到我尝试运行 Laravel Tinker,但它不起作用。我已经按照专门针对 Laravel Tinker 部分的升级指南进行操作。
Laravel Tinker
In order to continue using the tinker Artisan command, you should also install the laravel/tinker package:
composer require laravel/tinker
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 :
'providers' => [
/*
* Laravel Framework Service Providers...
*/
Laravel\Tinker\TinkerServiceProvider::class,
但是,当我运行命令“php artisantinker”时,它说:
[Symfony\Component\Console\Exception\CommandNotFoundException]
Command "tinker" is not defined.
有人以前经历过这种情况吗?
注意:其他 artisan 命令运行良好,我可以很好地看到我的网站。
最佳答案
Laravel Tinker
In order to continue using the tinker Artisan command, you should also install the laravel/tinker package:
composer require laravel/tinker
Once the package has been installed, you should add
Laravel\Tinker\TinkerServiceProvider::class
to the providers array in your config/app.php configuration file.
关于Laravel Tinker 从 5.3 升级到 5.4 后不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41888059/
这个问题在这里已经有了答案: PHP Artisan Tinker crashing from any command (2 个答案) 关闭 7 个月前。 每当我键入 php artisan tin
我是 laravel 的新手。 我想在 cygwin 中使用 php artisan tinker,但我在制作对象时遇到了一些错误。我看了一些视频,那个人是这样做的: $article = new a
我正在关注这组 tutorials在 laravel 上(他们很棒),我一直遇到这个错误: PHP error: Use of undefined constant Article 每当我输入这行代
从 5.3 升级到 5.4 后,按照说明操作: In order to continue using the tinker Artisan command, you should also insta
我有两个数据库连接。一个用于我的应用程序,另一个用于测试。在我的..\config\database.php 'mysql' => [ 'driver'
我以前没有遇到过这个问题,但是我的 php artisan tinker 因发出任何命令而崩溃 - 并且没有留下任何关于导致崩溃的日志。 project4 $ php artisan tinker P
我想知道如何更改 Tinker 的文本输出颜色。有人知道吗?或者更确切地说,它是 Ubuntu 的东西吗?我已经从 LS_COLORS 中完全删除了对颜色 34(深蓝色)的任何引用,并且仍然通过 Ti
我有以下代码: status == 1) { $model->status = 2; $model->save(
我可以使用以下命令获取第一个用户,他是 Laravel tinker 的管理员: $adminUser = App\User::where('is_admin',true)->first(); 我如何
首先,我使用下面的命令调用 artisantinker $ php artisan tinker 然后,我计划将 Admin 中的所有模型更新为“admin”,然后使用下面的命令保存更新 $admin
Laravel 的 php artisan tinker 中显示表和/或这些表的结构的命令是什么? 最佳答案 要获取所有表,请使用: $tables = \DB::select('show table
我无法在 Laravel Tinker 中使用模型工厂。 //ItemFactory.php class ItemFactory extends Factory { /** * Th
从 Tinker 内部,我正在尝试: >>> Auth::loginUsingId(12); => false >>> Auth::user(); => null >>> Auth::attempt(
Laravel 的 Tinker REPL 对于方便地试验模型很有用,但是似乎不可能导入 namespace ,需要费力地输入模型 namespace 。例如,这有效: $ php artisan t
我正在尝试使用tinker来操作我的项目的表,所以,我遇到的第一个问题是我创建了一个utf8编码的数据库,之后,我运行我的迁移,然后,表创建的文件使用 utf8mb4_unicode_ci。默认情况下
我已经为 Tinker Board 下载了 20170817-tinker-board-linaro-stretch-alip-v2.0.1.img。我正在尝试安装 OpenCV 3.0.0。我已按照
我现在已经搜索了几个小时,但即使有类似的问题也找不到解决方案。 我正在尝试运行 php artisan tinker在与用户 webmaster 的全新 laravel 安装上(谁是项目目录的所有者
考虑 laravel new bug 然后添加 .env DB_CONNECTION=sqlite DB_DATABASE=/home/me/Code/bug/storage/database.sql
如何将 Eloquent 查询的结果存储到修补程序中的变量,而无需将结果打印到控制台? 例如,当我运行$threads = App\Thread::all()时,我只想将结果存储在$threads变量
当我们使用 artisan tinker ,并引用一个 Eloquent 模型对象,REPL 会自动打印模型的属性,就像它打印我们引用的任何标准对象的公共(public)属性一样: >>> (obje
我是一名优秀的程序员,十分优秀!