Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/m-adamski/symfony-notification-bundle
The Symfony Bundle was created to support simple notifications
https://github.com/m-adamski/symfony-notification-bundle
notification-bundle php symfony symfony-bundle
Last synced: 3 months ago
JSON representation
The Symfony Bundle was created to support simple notifications
- Host: GitHub
- URL: https://github.com/m-adamski/symfony-notification-bundle
- Owner: m-adamski
- License: mit
- Created: 2018-10-24T08:49:42.000Z (over 6 years ago)
- Default Branch: 5.0
- Last Pushed: 2024-11-05T10:31:57.000Z (3 months ago)
- Last Synced: 2024-11-18T14:16:46.674Z (3 months ago)
- Topics: notification-bundle, php, symfony, symfony-bundle
- Language: PHP
- Homepage:
- Size: 36.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Notification Bundle for Symfony
The Symfony Bundle was created to support simple notifications.
Compared to previous versions, this one is based on simple methods of creating and adding notifications.Version 5.0 doesn't have compatibility with previous versions.
## Installation
Composer can install this bundle:
```
$ composer require m-adamski/symfony-notification-bundle
```## How to use it?
Compared to the previous version, to add a notification, we call the ``add`` function:
```php
use Adamski\Symfony\NotificationBundle\Helper\NotificationHelper;
use Adamski\Symfony\NotificationBundle\Model\Notification;
use Adamski\Symfony\NotificationBundle\Model\Type;$this->notificationHelper
->add(new Notification(Type::SUCCESS, "Sample notification"))
->add(new Notification(Type::SUCCESS, "Second sample notification"));
```The custom Twig function is responsible for displaying notifications (place it somewhere in the template):
```html
{{ notification() }}
```## License
MIT