Download the PHP package cjpanilag/simple-notifications without Composer
On this page you can find all versions of the php package cjpanilag/simple-notifications. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download cjpanilag/simple-notifications
More information about cjpanilag/simple-notifications
Files in cjpanilag/simple-notifications
Package simple-notifications
Short Description Simplified notifications for AWS SNS, FCM Push Notifications, emails, and more.
License MIT
Homepage https://github.com/cjpanilag/simple-notifications
Informations about the package simple-notifications
Simple Notifications for Laravel 8|9|10
[![Latest Version on Packagist][ico-version]][link-packagist] [![Total Downloads][ico-downloads]][link-downloads] [![GitHub Repo stars][ico-stars]][link-stars] [![Discord][ico-discord]][link-discord] [![Twitter Follow][ico-twitter]][link-twitter]
Simplified notifications for AWS SNS, FCM Push Notifications, emails, and more.
Installation
Via Composer
After migration, simple-notification
will generate two (2) tables namely fcm_tokens
& simple_devices
. Make sure to remove any conflicting table or attribute in your root project.
Usage
AWS SNS
User Model Configuration
Note: In order to let your Notification
know which phone you are sending to, the channel will look for the phone
, phone_number
or full_phone
attribute of the Notifiable
model.
Sending SMS to user
Sending SMS using content callable
Sending SMS using SnsMessage
as content
Available Methods
method | parameter | return type | description |
---|---|---|---|
user | Model |
static |
assigning user. |
content | SnsMessage string callable |
static |
can be message or a callable function. |
mobile | string |
static |
replacement for user methods. |
execute | none | void |
will execute the sending. |
Note: user
or mobile
method should not be used at the same time.
Example:
SES MAIL
User Model Configuration
Note: By default, Notification
will send email to User's email
attribute.
Sending Mail to user
Sending Mail using MailMessage
as content
php simpleNotifications()->mail()->emailAddress('[email protected]')->content(function ($user) { $mailMessage = new MailMessage(); $subject = 'test subject 2';
if ($user) {
$mailMessage->subject($subject);
}
$mailMessage->line('this is a best body number 2')
->action('PUSH ME!', 'https://test.com')
->line('this is a test footer 2');
return $mailMessage;
})->execute();
POST /api/device
POST /api/fcm-token bash $ composer test
## Contributing
Please see [contributing.md](contributing.md) for details and a todolist.
## Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
## Credits
- [Carl Jeffrie Panilag][link-author]
- [All Contributors][link-contributors]
## License
MIT. Please see the [license file](license.md) for more information.
[ico-version]: https://img.shields.io/packagist/v/cjpanilag/simple-notifications.svg
[ico-downloads]: https://img.shields.io/packagist/dt/cjpanilag/simple-notifications.svg
[ico-stars]: https://img.shields.io/github/stars/cjpanilag/simple-notifications
[ico-discord]: https://img.shields.io/discord/1143744619956404295?color=8c9eff&label=Discord&logo=discord
[ico-twitter]: https://img.shields.io/twitter/follow/carljeffrie
[link-packagist]: https://packagist.org/packages/cjpanilag/simple-notifications
[link-downloads]: https://packagist.org/packages/cjpanilag/simple-notifications
[link-stars]: https://github.com/cjpanilag/simple-notifications
[link-discord]: https://discord.gg/MBxxAkQAxx
[link-twitter]: https://twitter.com/carljeffrie
[link-author]: https://github.com/cjpanilag
[link-contributors]: ../../contributors
All versions of simple-notifications with dependencies
illuminate/support Version ~8|~9|~10
laravel-notification-channels/aws-sns Version ^1.4
laravel-notification-channels/fcm Version ~2.0
kreait/firebase-php Version 6.3.1
luchavez/starter-kit Version ^1.0
luchavez/aws-ses-bounce Version ^1.0