usamatoor / firebase-notifications
Laravel Firebase Notifications package using OAuth2 (Google) with cURL.
Installs: 3
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/usamatoor/firebase-notifications
Requires
- php: ^8.1
- illuminate/support: ^12.0
README
🔥 Laravel Firebase Notifications (OAuth2)
Send Firebase Cloud Messaging (FCM) notifications securely using OAuth2 in Laravel.
📦 Installation
composer require usamatoor/firebase-notifications
If you're developing locally:
"repositories": [
{
"type": "path",
"url": "packages/Usama/firebase-notifications"
}
]
Then run:
composer require usamatoor/firebase-notifications:dev-main
🔧 Configuration
Add the following to your .env file:
FIREBASE_CLIENT_ID=your-client-id
FIREBASE_CLIENT_SECRET=your-client-secret
FIREBASE_REFRESH_TOKEN=your-refresh-token
FIREBASE_PROJECT_ID=your-project-id
🚀 Usage
use Usama\FirebaseNotifications\FirebaseNotifications;
$firebase = new FirebaseNotifications();
$firebase->send(
$firebaseToken,
'Welcome!',
'Thank you for signing up.',
['data' => ['custom' => 'payload']]
);
📘 Documentation
- Full guide available in the
/docsdirectory. - Includes advanced usage, exception handling, and token refresh logic.
🙌 Contributing
Pull requests are welcome! For major changes, please open an issue first.
Created with ❤️ by Usama Toor