【问题标题】:Class 'Laravelista\Comments' not found未找到“Laravelista\Comments”类
【发布时间】:2019-04-22 18:24:20
【问题描述】:

我想在我的网站上实现一个评论系统,所以我去了github,发现Laravelista/Comments

它给我带来了太多问题,所以我删除了它:

  • 正在运行composer remove laravelista\Comments
  • 检查每个文件(在 VScode 上使用查找和替换)以查找术语 Laravelista\Comments 并将其删除。

现在根据 VSccode(我的文本编辑器),当我打开时,我的应用程序中还没有包含 Laravelista\Comments 一词的位置 http://localhost:8000/posts/new-post-3

我得到错误:

Symfony\Component\Debug\Exception\FatalThrowableError thrown with message "Class 'Laravelista\Comments' not found"

Stacktrace:
#0 Symfony\Component\Debug\Exception\FatalThrowableError in C:\xampp\htdocs\mysite\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Concerns\HasRelationships.php:668

请帮忙.....

【问题讨论】:

  • 尝试将 bootstrap/cache/config.php 文件重命名为 config.php.dnu
  • @ImJT 但是没有`bootstrap/cache/config.php`
  • 您可以尝试使用php artisan config:clear & php artisan cache:clear 清除缓存和配置
  • @ImJT 它停在bootstrap/cache/ 之后是 gitignore、packages.php 和 services.php 我在 L5 上
  • 继续检查你的packages.php里面的包。

标签: php laravel error-handling


【解决方案1】:

检查您的模型并确保已删除插件的所有实例。

该插件要求您在模型中设置字段,确保将这些字段删除。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2022-08-20
    • 2019-01-22
    • 2018-05-03
    • 2020-10-15
    • 2023-02-06
    • 2019-05-07
    • 2018-04-15
    • 2014-01-12
    相关资源
    最近更新 更多