发布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
相关产品推荐
相关产品推荐

