New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

jooservices/laravel-notifications

Laravel notification transport for Telegram, Slack, and email — send-only channel adapters with pre-rendered messages (no templates, queue, or logging).
1,024
Install
composer require jooservices/laravel-notifications
Latest Version:v1.0.1
PHP:^8.5
Laravel:12 · 13
License:MIT
Last Updated:Oct 19, 2026
Links: GitHub  ·  Packagist
Maintainer: jooservices

jooservices/laravel-notifications

CI Coverage (develop) Quality Gate (master) OpenSSF Scorecard PHP Version GitHub Release License: MIT Packagist Version Total Downloads

JOOservices Laravel Notifications is a send-only Laravel notification transport for Telegram, Slack, and email. The application owns templates, queueing, debounce, and logging. This package transports pre-rendered subject/body strings through channel adapters and returns a structured SendReport.

Composer package: jooservices/laravel-notifications — current line: v1.0.1.

Features

  • Telegram Bot API (sendMessage) via jooservices/client
  • Slack incoming webhooks via jooservices/client
  • Mail via Laravel Mailer (raw / HTML send) — no package Mailables or Blade views
  • Immutable Message DTO (jooservices/dto) with optional HTML body, scalar context, and recipients
  • Per-channel SendResult and aggregate SendReport
  • Missing credentials → skip (fail-open); HTTP/API errors → failed; other channels continue
  • Context-aware exceptions (jooservices/exceptions)
  • Auto-discovered service provider and Notification facade

Non-goals

  • Queue / ShouldQueue helpers
  • Templates / Blade / package Mailables / markdown mail
  • Log / Discord / SMS channels
  • Debounce / rate-limit

Requirements

  • PHP ^8.5
  • Laravel / Illuminate ^12|^13
  • Extensions: curl (for Telegram/Slack HTTP)

Installation

composer require jooservices/laravel-notifications:^1.0

Publish config

php artisan vendor:publish --provider="JOOservices\LaravelNotifications\LaravelNotificationsServiceProvider" --tag="config"

Environment

Variable Purpose
NOTIFICATION_DEFAULT_CHANNELS Comma-separated defaults (e.g. telegram,slack,mail)
NOTIFICATION_TELEGRAM_BOT_TOKEN Telegram bot token (also accepts TELEGRAM_BOT_TOKEN)
NOTIFICATION_TELEGRAM_CHAT_ID Telegram chat id (also accepts TELEGRAM_CHAT_ID)
NOTIFICATION_TELEGRAM_API_BASE API base (default https://api.telegram.org)
NOTIFICATION_TELEGRAM_TIMEOUT Seconds (default 5)
NOTIFICATION_SLACK_WEBHOOK_URL Slack incoming webhook URL
NOTIFICATION_SLACK_TIMEOUT Seconds (default 5)
NOTIFICATION_MAIL_MAILER Optional named mailer
NOTIFICATION_MAIL_TO Comma-separated default recipients
NOTIFICATION_MAIL_FROM_ADDRESS / NOTIFICATION_MAIL_FROM_NAME Optional from override

Quick start

use JOOservices\LaravelNotifications\Facades\Notification;
use JOOservices\LaravelNotifications\Message;

$body = view('ops.crawl_alert', $data)->render(); // app owns templates

$report = Notification::send(
    Message::make(subject: 'Source unhealthy: javdb', body: $body)
        ->html($htmlBody) // optional; mail only
        ->withContext(['source_slug' => 'javdb']),
    channels: ['telegram', 'slack', 'mail'],
);

if ($report->hasFailures()) {
    // app may log from SendReport — package does not
}

Omit channels to use NOTIFICATION_DEFAULT_CHANNELS / config default_channels.

Local development

make build
make install
make lint
make test

All PHP tooling runs in Docker (php:8.5-cli-bookworm). See WORKFLOWS.md for CI.

Documentation

License

MIT — see LICENSE.

Related Packages

jooservices/laravel-config

MongoDB-backed application configuration store for Laravel with typed access and...

2,486 0
jooservices/laravel-repository

PHP 8.5+ Laravel repository package for trait-based CRUD, filtering, ordering, a...

3,747 0
jooservices/laravel-logging

MongoDB-backed structured application logging for Laravel.

1,837 0
jooservices/laravel-controller

Laravel API controller foundation for standardized JSON envelopes, RFC 7807 Prob...

1,608 0

Version History

Version Released PHP Laravel License
v1.0.1 ^8.5 ^12.0|^13.0 MIT
v1.0.0 ^8.5 ^12.0|^13.0 MIT