承接 molnix/laravel-nextcloud-talk-channel 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

molnix/laravel-nextcloud-talk-channel

最新稳定版本:v1.0.1

Composer 安装命令:

composer require molnix/laravel-nextcloud-talk-channel

包简介

A Laravel notification channel for Nextcloud Talk

README 文档

README

Tests

This package makes it easy to send notifications using NextcloudTalk with Laravel 10.x, 11.x and 12.x.

Contents

Installation

You can install this package via composer:

composer require molnix/laravel-nextcloud-talk-channel

Setting up the NextcloudTalk service

Add your NextcloudTalk config to config/services.php:

// config/services.php
...
    'nextcloudtalk' => [
        'url' => env('NEXTCLOUD_URL'),
        'username' => env('NEXTCLOUD_USERNAME'),
        'password' => env('NEXTCLOUD_PASSWORD'),
        'default_channel' => env('NEXTCLOUD_DEFAULT_CHANNEL'),
        'one_to_one_channel_name' => env('NEXTCLOUD_ONE_TO_ONE_CHANNEL_NAME'),
    ],
...

Usage

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

use Illuminate\Notifications\Notification;
use Molnix\Channels\NextcloudTalkChannel;
use Molnix\Channels\NextcloudTalkMessage;

class NextcloudNotification extends Notification
{

    public function via(object $notifiable): array
    {
        return [NextcloudTalkChannel::class];
    }

    public function toNextcloudTalk()
    {
        return NextcloudTalkMessage::create('Hello');
    }

}

If you want the bot to make a channel with the user and send message (one to one), add routeNotificationForNextcloudTalk to your notifiable model:

public function routeNotificationForNextcloudTalk($notification): string
    {
        return $this->username;
    }

Channel selection order:

  1. Channel specified using NextcloudTalkMessage::to().
  2. routeNotificationForNextcloudTalk()
  3. default_channel specified in the config

Available Message methods

to(): To specify a nextcloud channel token, example groups etc.

content(): Sets a content of the notification message.

Testing

$ composer test

Security

If you discover any security related issues, please email vishnu@monlnix.com or johan@molnix.com instead of using the issue tracker.

Contributing

You are welcome to contribute

Credits

License

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

Made with ❤ in Finland with Molnix

统计信息

  • 总下载量: 1
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-10-27