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

v1.0.0 2025-06-24 14:09 UTC

This package is auto-updated.

Last update: 2025-12-24 16:51:14 UTC


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 /docs directory.
  • 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