-
-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kreait_firebase.my_project.messaging #23
Comments
It's written down in the README: https://github.com/kreait/firebase-bundle/blob/master/README.md#configuration - if something is unclear, please be more specific 🙏 |
okay i saw it but i can explain in more detail how to use the controller too, |
The services are private by default, if you want to get them as you described, in the configuration, set |
he did as you said but still gives an error like this |
The error message is quite specific - the service is public and exists, but you can't access it in your application. In that case, I would do as the error message suggests: use Dependency Injection. You can do this in Symfony in your service definition files, something like: // src/Controller/MyController.php
namespace App\Controller;
use Kreait\Firebase\Messaging;
class MyController
{
/** @var Messaging */
private $messaging;
public function __construct(Messaging $messaging)
{
$this->messaging = $messaging;
}
}
|
I am designing a panel like this, for example, as a lot of applications and I will choose from these applications and notify the application I want from the same place, so if I do this way, how do I access the applications from the data in the database and how do I choose it? I hope I could tell I don't know English, I write with translation service, Thank you |
namespace App\Service;
I am trying this method for now |
Your code has been translated as well 😅 (no problem, I understood what you meant). I don't know what to tell you - if you use dependency injection as recommended by Symfony (or in general) and use the Symfony mechanics to inject the Firebase Services in your own services, you should be fine - but then, don't use the If you prefer to use the |
hello how should i use these different accounts, i want to use a few different accounts
for example: kreait_firebase.my_project.messaging
kreait_firebase.other1.messaging
kreait_firebase.other2.messaging
The text was updated successfully, but these errors were encountered: