【发布时间】:2015-08-17 12:25:36
【问题描述】:
我在 laravel 4.2 上,我正在尝试安装 https://github.com/Ph3nol/NotificationPusher
它安装得很好,但我遇到了错误:
Symfony \ Component \ Debug \ Exception \ FatalErrorException (E_UNKNOWN)
Class 'PushManager' not found
当我如下运行 /push 路由时:
Route::get('push', function(){
// First, instantiate the manager and declare an adapter.
$pushManager = new PushManager();
$exampleAdapter = new ApnsAdapter();
// Set the device(s) to push the notification to.
$devices = new DeviceCollection(array(
new Device('Token1'),
new Device('Token2'),
new Device('Token3'),
// ...
));
// Then, create the push skel.
$message = new Message('This is an example.');
// Finally, create and add the push to the manager, and push it!
$push = new Push($exampleAdapter, $devices, $message);
$pushManager->add($push);
return $pushManager->push();
});
我会错过一步吗? (可能在我的 app.php 中声明提供者或别名)
【问题讨论】:
标签: php laravel laravel-4 push-notification google-cloud-messaging