Lark Notification Channel for laravel.

Overview

Lark notifications channel for Laravel

This package makes it easy to send Lark using the Laravel notification system. Supports 5.5+, 6.x, 7.x and 8.x.

Contents

Installation

You can install the package via composer:

composer require yajianguo/lark-notification-channel

Usage

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

use NotificationChannels\Lark\LarkChannel;
use NotificationChannels\Lark\LarkMessage;
use Illuminate\Notifications\Notification;

class ProjectCreated extends Notification
{
    public function via($notifiable)
    {
        return [LarkChannel::class];
    }

    public function toLark($notifiable)
    {
        return LarkMessage::create()
            ->data([
               'payload' => [
                   'lark' => 'data'
               ]
            ])
            ->userAgent("Custom-User-Agent")
            ->header('X-Custom', 'Custom-Header');
    }
}

In order to let your Notification know which URL should receive the Lark data, add the routeNotificationForLark method to your Notifiable model.

This method needs to return the URL where the notification Lark will receive a POST request.

public function routeNotificationForLark()
{
    return 'http://requestb.in/1234x';
}

Available methods

  • data(''): Accepts a JSON-encodable value for the Lark body.
  • query(''): Accepts an associative array of query string values to add to the request.
  • userAgent(''): Accepts a string value for the Lark user agent.
  • header($name, $value): Sets additional headers to send with the POST Lark.

Changelog

Please see CHANGELOG for more information what has changed recently.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Contributing

Please see CONTRIBUTING for details.

Credits

License

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

You might also like...
AmaranJS stylish notification for your laravel application.

AmaranJS Laravel 5 Package AmaranJS L5 package is a Laravel wrapper for my jquery plugin AmaranJS.You can create easy and stylish notifications with A

Our Laravel Sendgrid Notification package

laravel-sendgrid-notification-channel Laravel Sendgrid Notification channel Installation To get started, you need to require this package: composer re

 Lara-Izitoast : Laravel Notification Package
Lara-Izitoast : Laravel Notification Package

Lara-Izitoast : Laravel Notification Package This is a laravel notification wrapper build with http://izitoast.marcelodolce.com javascript library. Ho

Notification package for Laravel

Package is looking for maintainers Please contact me if interested. Notification package for Laravel4 / Laravel5 A simple notification management pack

Laravel notification manager

Easily manage notifications and notification subscriptions in your Laravel application.

Livewire Package to display Toast Notification based on TALL Stack.
Livewire Package to display Toast Notification based on TALL Stack.

livewire-toast Livewire Package to display Toast Notification based on TALL Stack. Requirements Make sure that Livewire is installed properly on your

ApnsPHP: Apple Push Notification & Feedback Provider
ApnsPHP: Apple Push Notification & Feedback Provider

ApnsPHP: Apple Push Notification & Feedback Provider A full set of open source PHP classes to interact with the Apple Push Notification service for th

A filterable git commit summary notification mailer
A filterable git commit summary notification mailer

Git commit notification A symfony application to allow receiving commit notification for all commits in a certain time period. Features: Receive one m

Bootstrap 4 & 5 replacement for jGrowl notification
Bootstrap 4 & 5 replacement for jGrowl notification

XoopsGrowl module for XOOPS CMS 2.5.11+ XoopsGrowl is a module for XOOPS CMS to configure an alternative to the jGrowl notification using Bootstrap Al

Releases(v1.0.0)
Owner
null
Google Chat - Laravel Notification Channel

Google Chat - Laravel Notification Channel This package makes it easy to send notifications using Google Chat , (formerly known as Hangouts Chat) with

Laravel Notification Channels 36 Dec 6, 2022
Laravel SMS Notification Channel

Laravel SMS Notification Channel Installation composer require guangda/laravel-sms-notification-channel env 配置 SMS_PROVIDER=yunpian SMS_SIGNATURE=【签名

Guangda 6 Dec 29, 2021
An SMS notification channel for the PHP framework Laravel.

Laravel SMS notification channel An SMS notification channel for the PHP framework Laravel. Supported SMS gateways: 46elks Cellsynt Telenor SMS Pro Tw

Andreas 2 Jan 22, 2022
Laravel FCM (Firebase Cloud Messaging) Notification Channel

Laravel FCM Notification Laravel FCM (Firebase Cloud Messaging) Notification Channel Use this package to send push notifications via Laravel to Fireba

Vishal Dudhatra 3 Jul 3, 2022
📨 Facebook Notifications Channel for Laravel

Facebook Notifications Channel for Laravel This package makes it easy to send notifications using the Facebook Messenger with Laravel. Contents Instal

Laravel Notification Channels 142 Dec 27, 2022
✈️ Whatsapp Notifications Channel for Laravel

Whatsapp Notifications Channel for Laravel This package makes it easy to send Whatsapp notification using Venom API with Laravel. This package was cre

Felipe Damaceno Teodoro 63 Dec 7, 2022
Notion.so notifications channel for Laravel

Installation composer require astroshippers/notion-notification-channel Usage Inside eloquent model: public function routeNotificationForNotion(): arr

AstroShippers 3 Jul 4, 2022
Multiple channels of laravel exception notification(DingTalk、FeiShu、ServerChan、WeWork、XiZhi). - 多种通道的 laravel 异常通知(钉钉群机器人、飞书群机器人、Server 酱、企业微信群机器人、息知)。

laravel-exception-notify 简体中文 | ENGLISH Multiple channels of laravel exception notification(DingTalk、FeiShu、ServerChan、WeWork、XiZhi). - 多种通道的 laravel

guanguans 61 Dec 8, 2022
A Toast notification library for the Laravel TALL stack.

A Toast notification library for the Laravel TALL stack. You can push notifications from the backend or frontend to render customizable toasts with almost zero footprint on the published CSS/JS ????

John F 365 Jan 7, 2023
Slack notification for Laravel as it should be. Easy, fast, simple and highly testable.

Based on illuminate/mail About Laravel Slack Slack notification for Laravel as it should be. Easy, fast, simple and highly testable. Since it uses On-

Guilherme Pressutto 284 Aug 24, 2022