找不到“推杆"类 [英] Class 'Pusher' not found
本文介绍了找不到“推杆"类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
安装Pusher软件包时,出现错误找不到类'Pusher'".
When I install Pusher package, I got an error "Class 'Pusher' not found".
推荐答案
Claudio的诊断是正确的,在版本3中添加了名称空间Pusher.但是建议不要更改Laravel文件.
Claudio's diagnosis is correct, the namespace Pusher was added in version 3; but changing the Laravel files is not a recommended solution.
一种更好的方法是在config/app.php
中创建一个别名.在别名"键下,将其添加到第三方别名"部分的数组中:
A better way is to create an alias in config/app.php
. Under the 'aliases' key, add this to the array in the "Third Party Aliases" section:
'Pusher' => Pusher\Pusher::class,
这篇关于找不到“推杆"类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文