Comments (13)
From what I can see, this does indeed look alright dependency-wise 🤔
If Laravel can‘t resolve the firebase.messaging
Service (it tries to interpret it as a class name, not as the service name), perhaps the ServiceProvider of the package has not been auto-discovered...
If you do a composer dump-autoload
, you should see a Discovered package: kreait/laravel-firebase
line. If you don‘t, are you on... wait a minute! According to your composer show
output, you haven‘t installed the package 😅
(I‘m writing this all on the phone, that‘s why you are receiving my thoughts and findings unfiltered 🙈)
from laravel-firebase.
I'm glad we figured it out together 🌺🥳
from laravel-firebase.
@juanzeta33 Did you add
$app->register(Kreait\Laravel\Firebase\ServiceProvider::class);
to your bootstrap/app.php
file?
from laravel-firebase.
Hi,
Forget everything, I just forget to updated the app.php file in my dev server.
Sorry.
from laravel-firebase.
You don’t need to instantiate the factory or anything, app('firebase.messaging')
is enough to retrieve the fully configured messaging component.
You showed code, but what‘s the problem? 😅
from laravel-firebase.
Hey, thanks for the quick answer! Problem is I get this error:
Target class [firebase.messaging] does not exist.
from laravel-firebase.
Ah, missed the title 😅
Hm, strange. Have you set the FIREBASE_CREDENTIALS
variable in your .env file? And could you please share the output of composer show | grep kreait
?
from laravel-firebase.
If you prefer to use an array instead of a credentials file, you could publish the package configuration and use the array as a value for the credentials.file
key (the line where it reads the environment variable by default)
from laravel-firebase.
Yep I do have the credentials set. This is the output of compose show | grep kreait
kreait/clock 1.0.1 A PHP 7.0 compatible cloc...
kreait/firebase-php 5.2.0 Firebase Admin SDK
kreait/firebase-tokens 1.10.0 A library to work with Fi...
from laravel-firebase.
Thanks man, I am as stupid as it gets. I could swear I installed it, like I can see myself having done it. Must've done it for another project, or confinement has finally destroyed my brain.
Anyways, thanks again for your help, is working now!
from laravel-firebase.
Hi, I was having this same error, I read all your comment but I thing I have all the setup config good.
But I have continue getting the error: Class firebase.messaging does not exist
I'm using lumen with the package Kreit.
from laravel-firebase.
Hi, thanks for the quick answer.
Yep, I have done that.
I follow all the step (I think so) describe in the official documentation.
- Add the json file and the FIREBASE_CREDENTIALS in the env
- Add the 4 package that install from Kreait (clock, firebase-php, firebase-tokens and laravel-firebase)
- Call the Facades in the page that I'm trying to use the messaging.
- Call the $messaging = app('firebase.messaging'); for send the push notifications
- add the $app->register(Kreait\Laravel\Firebase\ServiceProvider::class); in the app.php
But continue having the error :(
from laravel-firebase.
What worked for me is updating packages.php & services.php in bootstrap/cache folder
from laravel-firebase.
Related Issues (20)
- Next release HOT 2
- No publishable resources for tag []. Publishing complete. HOT 5
- Callable functions
- SenderId mismatch HOT 7
- Laravel error HOT 2
- getting error HOT 1
- Incompatibility with Eloquent Resources? HOT 1
- Confirm email verification Support
- Its not supported php 8. Please fix this
- Push notifications are not getting displayed in IOS and Android randomly HOT 1
- Be able to override FirestoreClient::DEFAULT_DATABASE HOT 7
- Support PHP8.3 HOT 2
- Firestore insert or update problem when using laravel-octane HOT 3
- Auto discovery not working similar to v4.x HOT 6
- Cannot mock final class for phpunit tests as it's return type is other final class HOT 1
- Support symfony/cache version 7 HOT 3
- Make Support For Laravel 11 HOT 2
- Curl error on Laravel 11 HOT 9
- laravel publish issue HOT 1
- Unable to install kreait/laravel-firebase on Laravel 11 project HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-firebase.