You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

发布kyslik/column-sortable包时遭遇Class not found错误求助

解决Laravel发布kyslik/column-sortable配置时“Class not found”错误

出现这个错误是因为你执行命令时写错了服务提供者的类名——原命令里把命名空间的反斜杠给省略了,导致Laravel找不到对应的类文件。

正确的发布命令

执行这条命令即可正常发布配置:

php artisan vendor:publish --provider="Kyslik\ColumnSortable\ColumnSortableServiceProvider" --tag="config"

额外排查步骤

  • 先确认已经通过Composer安装了kyslik/column-sortable包,未安装的话先运行:
    composer require kyslik/column-sortable
    
  • 若你使用的是Laravel 5.5以下版本,还需要手动在config/app.php的providers数组中添加服务提供者:
    Kyslik\ColumnSortable\ColumnSortableServiceProvider::class,
    

内容的提问来源于stack exchange,提问作者Primarch_Guilleman

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.20 16:12:31