【发布时间】:2020-05-21 19:15:49
【问题描述】:
我是 laravel 的新手。 在 laracast 上的教程视频之后,我做了一个新的迁移(cmd 命令),如下所示
php artisan make:migration delete_title_from_posts_table
它给了我信息
Created Migration: 2020_02_05_185721_delete_title_from_posts_table
之后,没有 php artisian 命令在 cmd 中运行。
我运行的任何命令都会出现以下错误
In Container.php line 805:
Target class [db] does not exist.
In Container.php line 803:
Class db does not exist
这是什么原因造成的? 我在 Win10 64 位上的 laravel 应用程序版本=6.2 和 php 版本=7.3.5。
我已经查看过的类似问题,不适合我
artisan-commands-not-working-after-composer-update
in-container-php-line-805-target-class-db-does-not-exist
【问题讨论】:
-
如果运行 -> composer dump-autoload composer update
-
已经尝试过这个,它给出了同样的错误,但有额外的响应----Script @php artisan package:discover --ansi 处理返回的自动加载转储后事件,错误代码为 1--- -