Download the PHP package usenoty/noty-laravel without Composer
On this page you can find all versions of the php package usenoty/noty-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download usenoty/noty-laravel
More information about usenoty/noty-laravel
Files in usenoty/noty-laravel
Package noty-laravel
Short Description Non-blocking Noty Notification Channel for Laravel.
License MIT
Homepage https://github.com/usenoty/noty-laravel
Informations about the package noty-laravel
Noty Laravel
A non-blocking notification channel for Laravel that sends events to Noty API. Perfect for tracking user activities, application events, and telemetry data without impacting your app's performance.
โจ Features
- ๐ Non-Blocking: Uses async HTTP requests that don't slow down your app
- ๐ก๏ธ Fail-Silent: Never breaks your app, even if the tracking service is down
- โก Auto-Flush: Automatically sends pending events after response is sent
- ๐ฏ Simple API: Just like Sentry - use
captureEvent()or Laravel notifications - ๐ Fluent Builder: Type-safe
NotyMessageclass for elegant event building - ๐ Queue Support: Optional queue-based transport for high-volume applications
- ๐ Rich Events: Support for actions, tags, attachments, and emojis
๐ฆ Installation
Install via Composer:
Publish the configuration file:
โ๏ธ Configuration
Set your Noty API credentials in .env:
๐ Quick Start
Method 1: Using NotyMessage (Recommended)
The NotyMessage class provides a fluent, type-safe API:
Method 2: Using Laravel Notifications
Create a notification class:
Send the notification:
Method 3: Using captureEvent (Like Sentry)
Or using the helper function:
๐ NotyMessage API Reference
Basic Usage
Priority Constants
Actions
Tags
Emojis
๐ง Channel Configuration
Named Channels (Recommended)
Define channel names in .env:
Use in code:
Direct Channel IDs
๐ Transport Options
HTTP Transport (Default)
Events are sent asynchronously via HTTP after the response is sent to the user.
Queue Transport
For high-volume applications, use queue transport:
๐ Event Data Structure
Events are sent to the Noty API with the following structure:
๐ How It Works
- Non-Blocking: When you call
captureEvent(), the event is queued but not sent immediately - Async Requests: HTTP requests are made asynchronously using Guzzle promises
- Auto-Flush: After Laravel sends the response, pending events are flushed in the background
- Fail-Silent: If the Noty API is unreachable, your app continues working normally
๐ Complete Example
๐ฏ When to Use Each Method
- NotyMessage: Best for most cases - type-safe, fluent, and readable
- Laravel Notifications: Best for reusable notifications sent to multiple users
- captureEvent: Best for simple, one-off events or custom builders
๐ Requirements
- PHP: 8.2, 8.3, or 8.4
- Laravel: 10.x, 11.x, or 12.x
- Guzzle: 7.x
๐ Supported Versions
| Laravel | PHP | Status |
|---|---|---|
| 12.x | 8.2+ | โ Active |
| 11.x | 8.2+ | โ Active |
| 10.x | 8.2+ | โ Active |
| 9.x | โ | โ Unsupported |
| 8.x | โ | โ Unsupported |
๐งช Testing
This package is continuously tested with:
- A comprehensive PHPUnit suite covering transports, the notification channel, the queue job, the service provider, and the artisan command
- PHPStan Level 5 static analysis
- Multiple PHP versions (8.2, 8.3, 8.4)
- Multiple Laravel versions (10.x, 11.x, 12.x) on both
prefer-lowestandprefer-stabledependencies
Running Tests
๐ License
This project is licensed under the MIT License. See the LICENSE file for details.
Made with โค๏ธ for Laravel developers
All versions of noty-laravel with dependencies
illuminate/support Version ^10.0|^11.0|^12.0
illuminate/notifications Version ^10.0|^11.0|^12.0
illuminate/queue Version ^10.0|^11.0|^12.0
guzzlehttp/guzzle Version ^7.0