Download the PHP package cable8mm/laravel-sens without Composer
On this page you can find all versions of the php package cable8mm/laravel-sens. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download cable8mm/laravel-sens
More information about cable8mm/laravel-sens
Files in cable8mm/laravel-sens
Package laravel-sens
Short Description NCloud SENS notification channels for Lovely Laravel.
License MIT
Homepage https://open.kakao.com/o/g3dWlf0
Informations about the package laravel-sens
Laravel NCLOUD SENS Notification Channel
Laravel notification channels for NAVER Cloud Platform SENS.
This package is a maintained fork of seungmun/laravel-sens. The original package provided the foundation for sending SMS, MMS, and Kakao AlimTalk notifications through NCLOUD SENS. This fork keeps the package usable with current PHP and Laravel versions while preserving the existing public API as much as possible.
Features
- SMS and LMS (Long SMS) notifications
- MMS notifications with file attachment support (max 1MB)
- Kakao AlimTalk notifications with buttons and scheduling
- Laravel notification channel integration
- Auto-discovery service provider
- Support for multiple recipients
Requirements
- PHP 8.2 or higher for Laravel 10, 11, and 12
- PHP 8.3 or higher for Laravel 13
- Laravel 10, 11, 12, or 13
- NCLOUD SENS credentials and service IDs
Installation
Install the package with Composer:
Laravel will automatically discover the service provider.
Publish the configuration file when you want to customize it:
Configuration
Add your NCLOUD SENS credentials to .env:
The SENS_PlUS_FRIEND_ID key keeps the spelling used by the original package configuration.
If you publish the configuration, it will be available at config/laravel-sens.php.
Usage
Use this package through Laravel's built-in notification system.
Sending SMS
Create a notification:
Return SmsChannel::class from via() and build an SmsMessage from toSms():
Sending to Multiple Recipients:
You can send to multiple recipients by chaining the to() method:
SMS vs LMS:
- SMS: Up to 80 bytes (Korean text: ~40 characters)
- LMS: Up to 2000 bytes (supports subject line)
Use type('LMS') and subject() for longer messages:
Content Type:
COMM: Commercial message (광고성 메시지)AD: Advertisement (광고 메시지)
Send the notification as usual:
Sending MMS
Use type('MMS') and attach a file path or an Illuminate\Http\UploadedFile instance:
Sending AlimTalk
Return AlimTalkChannel::class from via() and build an AlimTalkMessage from toAlimTalk():
Adding Buttons:
You can add interactive buttons to AlimTalk messages:
Button Types:
DS: Deep Link (앱으로 이동)WL: Web Link (웹 페이지로 이동)BK: Block (메시지 차단)MD: Message Delivery (메시지 전달)
Scheduled Messages:
Schedule messages for future delivery:
Custom Plus Friend ID:
Override the default Plus Friend ID:
Compatibility Notes
The Composer package name is cable8mm/laravel-sens, but the PHP namespace remains Seungmun\Sens for backward compatibility with the original package.
If you are migrating from seungmun/laravel-sens, replace the Composer package and keep your existing notification code:
Contributing
Issues and pull requests are welcome. Please keep changes focused, include tests for behavior changes, and run the test suite before opening a pull request:
Credits
- Seungmun Jeong, original author
- Samgu Lee, fork maintainer
- All contributors to the original and forked packages
Troubleshooting
Common Issues
1. "NCP tokens are invalid" Error
This error occurs when your configuration is incomplete or incorrect. Check the following:
- Verify that all environment variables are set in your
.envfile - Ensure you're using the correct Service IDs (SMS and AlimTalk have different Service IDs)
- Check that your Access Key and Secret Key are correct
- Make sure there are no extra spaces in your
.envvalues
2. File Upload Fails for MMS
- Ensure the file size is under 1MB
- Check that the file path is correct and readable
- For uploaded files, use
request()->file('image')instead ofrequest()->input('image')
3. AlimTalk Template Code Not Working
- Verify the template code exists in your NCLOUD SENS console
- Ensure the template is approved and in "Active" status
- Check that your Plus Friend ID matches the one registered in NCLOUD
4. Messages Not Being Sent
- Check your Laravel logs (
storage/logs/laravel.log) for detailed error messages - Verify your NCLOUD SENS balance and service status
- Ensure your server can reach
sens.apigw.ntruss.com
Debugging Tips
Enable debug logging to see detailed API requests and responses:
The package logs errors with context when API calls fail:
- Error messages
- Exception types
- Request parameters (without sensitive data)
License
This package is open-sourced software licensed under the MIT license.
All versions of laravel-sens with dependencies
ext-json Version *
guzzlehttp/guzzle Version ^6.0|^7.0
illuminate/support Version ^10.0|^11.0|^12.0|^13.0
illuminate/notifications Version ^10.0|^11.0|^12.0|^13.0