Download the PHP package 3neti/laravel-model-channel without Composer
On this page you can find all versions of the php package 3neti/laravel-model-channel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download 3neti/laravel-model-channel
More information about 3neti/laravel-model-channel
Files in 3neti/laravel-model-channel
Package laravel-model-channel
Short Description A package to enable assigning communication channels to Eloquent models.
License proprietary
Informations about the package laravel-model-channel
laravel-model-channel
A schema-light Laravel capability package for attaching delivery and communication channels to Eloquent models through a polymorphic channels table.
Release-tested platforms
- PHP 8.3+ with Laravel 12
- PHP 8.3+ with Laravel 13
- Pest 3 or 4 for package development
The runtime constraint remains compatible with Laravel 11 for existing consumers, but Laravel 11 is no longer a release-tested lane because currently available versions are blocked by Composer security advisories.
Why this package exists
This package lets a model expose capabilities like mobile or webhook delivery without requiring host apps to add direct columns such as users.mobile or users.webhook.
Channels are stored in the package-owned morph table, keeping your application schema clean and flexible.
Installation
Supported Channel Types
Out of the box, the package supports:
mobile(normalized to E.164 without+)webhook(validated URL)telegram(numeric ID)whatsapp(phone-based)viber(phone-based)
All channels are validated via enum-backed rules.
Basic usage
Explicit capability API
Mobile
Accepted formats:
All normalize to:
Webhook
Generic API
Using enum:
Delete a channel:
Magic properties (backward compatibility)
Additional helpers
Telegram
Viber
Finders
Mobile finder supports multiple formats.
Performance & Caching
Database Indexing (Recommended)
For optimal performance, especially for findByMobile() and findByChannel(), add indexes:
Lookup Caching (Optional)
Caching is designed for finder methods only, not accessor reads.
Supported cached operations:
findByMobile()findByWebhook()findByChannel()(for configured channels)
Example config:
Cache Behavior
- caches model IDs only (not full models)
- caches misses to prevent repeated DB queries
- automatically invalidates on update or delete
- does NOT cache accessor methods like
getMobileChannel()
External package integration
Storage model
No schema changes required.
All data is stored in the polymorphic channels table.
All versions of laravel-model-channel with dependencies
illuminate/contracts Version ^11.0|^12.0|^13.0
illuminate/database Version ^11.0|^12.0|^13.0
illuminate/support Version ^11.0|^12.0|^13.0
propaganistas/laravel-phone Version ^6.0