Open exzachlyvv opened 4 years ago
Quick (dirty-way) fix (until official library upgrade) is to change FCMManager.php
to:
class FCMManager extends Manager
{
public function getDefaultDriver()
{
return config('fcm.driver');
}
protected function createHttpDriver()
{
$config = config('fcm.http');
return new Client(['timeout' => $config[ 'timeout' ]]);
}
}
I have a fork with this fix in it if anyone wants to use it:
https://github.com/zach-lum-fm/Laravel-FCM
In composer.json:
"repositories": [
{
"type": "vcs",
"url": "git@github.com:zach-lum-fm/laravel-fcm.git"
}
],
Hey @zach-lum-fm
I've added your repo to my composer.json
"repositories": [ { "type": "package", "package": { "name": "zach-lum-fm/laravel-fcm", "version": "2", "type": "git", "source": { "url": "https://github.com/zach-lum-fm/Laravel-FCM", "type": "git", "reference": "master" } } } ],
and composer cloned the source code to vendor/zach-lum-fm/laravel-fcm
But i got an error
Class 'LaravelFCM\FCMServiceProvider' not found
How to let Laravel recognize our vendor/zach-lum-fm/laravel-fcm ?
Hey @zach-lum-fm I've added your repo to my composer.json
"repositories": [ { "type": "package", "package": { "name": "zach-lum-fm/laravel-fcm", "version": "2", "type": "git", "source": { "url": "https://github.com/zach-lum-fm/Laravel-FCM", "type": "git", "reference": "master" } } } ],
and composer cloned the source code to vendor/zach-lum-fm/laravel-fcmBut i got an error
Class 'LaravelFCM\FCMServiceProvider' not found
How to let Laravel recognize our vendor/zach-lum-fm/laravel-fcm ?
replace "repositories": [ { "type": "vcs", "url": "git@github.com:zach-lum-fm/laravel-fcm.git" } ],
and in "require" section "apility/laravel-fcm": "dev-master"
Amazing! It worked. Thank you so much @TaPTaK
+1
After upgrading to Laravel 8, seeing this error:
Undefined property: LaravelFCM\FCMManager::$app