All Projects → enniel → laravel-fcm-notification-channel

enniel / laravel-fcm-notification-channel

Licence: MIT license
No description or website provided.

Programming Languages

PHP
23972 projects - #3 most used programming language
Roff
2310 projects

Projects that are alternatives of or similar to laravel-fcm-notification-channel

Ombi
Want a Movie or TV Show on Plex/Emby/Jellyfin? Use Ombi!
Stars: ✭ 2,711 (+11686.96%)
Mutual labels:  notifications
Overlay support
a flutter toast and notification library
Stars: ✭ 232 (+908.7%)
Mutual labels:  notifications
notifier
📟 Extensible library for building notifications and sending them via different delivery channels
Stars: ✭ 24 (+4.35%)
Mutual labels:  notifications
Rspec Nc
🚦 RSpec formatter for OS X's Notification Center
Stars: ✭ 223 (+869.57%)
Mutual labels:  notifications
React Hot Toast
Smoking hot React Notifications 🔥
Stars: ✭ 4,282 (+18517.39%)
Mutual labels:  notifications
Toasted Notes
simple, flexible toast notifications for react
Stars: ✭ 241 (+947.83%)
Mutual labels:  notifications
Django Webpush
Web Push Notification Package for Django
Stars: ✭ 217 (+843.48%)
Mutual labels:  notifications
mongodb-backup-manager
🌿 A Full-stack MongoDB Backup System.
Stars: ✭ 42 (+82.61%)
Mutual labels:  notifications
Psslack
PowerShell module for simple Slack integration
Stars: ✭ 231 (+904.35%)
Mutual labels:  notifications
Netdata
Real-time performance monitoring, done right! https://www.netdata.cloud
Stars: ✭ 57,056 (+247969.57%)
Mutual labels:  notifications
Android Notifications
Migrated:
Stars: ✭ 225 (+878.26%)
Mutual labels:  notifications
Alert After
Get a desktop notification after a command finishes executing.
Stars: ✭ 230 (+900%)
Mutual labels:  notifications
React Web Notification
React component with HTML5 Web Notification API
Stars: ✭ 241 (+947.83%)
Mutual labels:  notifications
Apns2
⚡ HTTP/2 Apple Push Notification Service (APNs) push provider for Go — Send push notifications to iOS, tvOS, Safari and OSX apps, using the APNs HTTP/2 protocol.
Stars: ✭ 2,569 (+11069.57%)
Mutual labels:  notifications
mobile-messaging-sdk-ios
Mobile Messaging SDK for iOS
Stars: ✭ 45 (+95.65%)
Mutual labels:  notifications
React Notification System
A complete and totally customizable component for notifications in React
Stars: ✭ 2,439 (+10504.35%)
Mutual labels:  notifications
Herbe
Daemon-less notifications without D-Bus. Minimal and lightweight.
Stars: ✭ 235 (+921.74%)
Mutual labels:  notifications
vue-dk-toast
Lightweight toast-notification plugin for Vue 3 🍞
Stars: ✭ 23 (+0%)
Mutual labels:  notifications
sutanlab.id
☕️ My Personal Homepage & Blog site with NextJS. 🇺🇸 🇮🇩
Stars: ✭ 39 (+69.57%)
Mutual labels:  notifications
React Materialui Notifications
Spec compliant notifications for react and material ui users
Stars: ✭ 252 (+995.65%)
Mutual labels:  notifications

FCM notification channel for Laravel 5.3

This package makes it easy to send notifications using Firebase Cloud Messaging (FCM) with Laravel 5.3. This package is based on brozot/laravel-fcm, so please read that documentation for more information.

Contents

Installation

You can install this package via composer:

composer require enniel/laravel-fcm-notification-channel:1.*

Register the provider directly in your app configuration file config/app.php:

'providers' => [
    // ...

    NotificationChannels\FCM\ServiceProvider::class 
]

Usage

Now you can use the channel in your via() method inside the notification:

use NotificationChannels\FCM\FCMMessage;
use Illuminate\Notifications\Notification;

class ExampleNotification extends Notification
{
    public function via($notifiable)
    {
        return ['fcm'];
    }

    public function toFCM($notifiable)
    {
        return (new FCMMessage())
            ->notification([
                'title' => 'Notification title',
                'body' => 'Notification body',
            ]);
    }
}

Available message types:

  • FCMMessage: Send notifications to device(s).
  • FCMMessageTopic: Send notifications to topic(s).
  • FCMMessageGroup: Send notifications to group(s).

In order for your notice to know who to send messages, you must add routeNotificationForFCM method to your notification model.

Available message methods

  • data(): Notification data. array | LaravelFCM\Message\PayloadData | LaravelFCM\Message\PayloadDataBuilder
  • options(): Notification options. array | LaravelFCM\Message\Options | LaravelFCM\Message\OptionsBuilder
  • notification(): Notification content. array | LaravelFCM\Message\PayloadNotification | LaravelFCM\Message\PayloadNotificationBuilder

Proxy methods. See brozot/laravel-fcm for more information about this methods.

  • setDryRun
  • setPriority
  • setTimeToLive
  • setCollapseKey
  • setDelayWhileIdle
  • setMutableContent
  • setContentAvailable
  • setRestrictedPackageName
  • isDryRun
  • getPriority
  • getTimeToLive
  • getCollapseKey
  • isDelayWhileIdle
  • isMutableContent
  • isContentAvailable
  • getRestrictedPackageName
  • setTag
  • setBody
  • setIcon
  • setTitle
  • setSound
  • setBadge
  • setColor
  • setChannelId
  • setClickAction
  • setBodyLocationKey
  • setBodyLocationArgs
  • setTitleLocationKey
  • setTitleLocationArgs
  • getTag
  • getBody
  • getIcon
  • getTitle
  • getSound
  • getBadge
  • getColor
  • getChannelId
  • getClickAction
  • getBodyLocationKey
  • getBodyLocationArgs
  • getTitleLocationKey
  • getTitleLocationArgs

Testing

$ composer test

Credits

Support

Having trouble? Open an issue!

License

The MIT License (MIT). Please see License File for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].