Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/padosoft/laravel-notification
Notification system for laravel
https://github.com/padosoft/laravel-notification
email laravel laravel-package notifications slack sms
Last synced: 4 days ago
JSON representation
Notification system for laravel
- Host: GitHub
- URL: https://github.com/padosoft/laravel-notification
- Owner: padosoft
- Created: 2018-05-14T13:54:18.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-06-04T08:54:06.000Z (5 months ago)
- Last Synced: 2024-10-06T20:16:56.046Z (about 1 month ago)
- Topics: email, laravel, laravel-package, notifications, slack, sms
- Language: PHP
- Size: 308 KB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Laravel Notification
[![License](https://poser.pugx.org/anlutro/l4-settings/license.svg)](http://opensource.org/licenses/MIT)
System for managing Laravel Notifications via database.
## Installation
This package can be used in Laravel 5.8 or higher.
For previous version or Laravel please check v 1.* of this package
*NB: From version 4.0.0 of this package Nexmo/Vonage and Slack Notification is not automatically supported.*
To send Notifications via SMS or Slack see official [Laravel documentation](https://laravel.com/docs/10.x/notifications#sms-notifications)
1. `composer require padosoft/laravel-notification`
2. Publish the config file by running `php artisan vendor:publish --provider="Padosoft\Laravel\Notification\NotificationServiceProvider" --tag="migrations"`.##Config
If you want you can publish also the config of the package
Publish the config file by running `php artisan vendor:publish --provider="Padosoft\Laravel\Notification\NotificationServiceProvider" --tag="config"`.## Usage
You can generate a Notification Class with an artisan command and register it into database.
```bash
php artisan notification-manager:create user_is_registered
```
This command will create an App\Notifications\user_is_registered class.
Now you can customize your notification.
To enable the notifications you can put to 1 the active field on the database.
To set the recipients of your notification you have to populate mynotifications_users and mynotifications_roles table.
Then you can send your notification like this:
```php
NotificationManager::dispatch(new \App\Notifications\user_is_registered('prova messaggio','prova'))
```## Contact
Open an issue on GitHub if you have any problems or suggestions.
## License
The contents of this repository is released under the [MIT license](http://opensource.org/licenses/MIT).