awema-pl / module-system-notify
Module for display notifications in theme.
Installs: 60
Dependents: 14
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Language:Vue
Requires
- illuminate/support: ~5|~6|~7|~8|~9
README
This is where your description should go. Take a look at contributing.md to see a to do list.
Documentation
NPM scripts
Development mode npm run watch
or simply npm start
Development mode for IE npm run watch:legacy
Production build npm run build
Installation
Via Composer
$ composer require awema-pl/module-system-notify
The package will automatically register itself.
Usage
Create a container to display notifications in:
@notify(['name' => 'container', 'stack' => false, 'config' => "{theme: 'inline', timeout: 0}"])
More info about custom containers
// notify in different styles to specific container Notify::info('title', 'message')->to('container'); Notify::error('title', 'message')->to('container'); Notify::warning('title', 'message')->to('container'); Notify::success('title', 'message')->to('container'); // add button to notification Notify::notify('title', 'message', 'success') ->withButton([ 'text' => 'Install now', // button cta text, required 'url' => '/path', // required 'data' => [ 'param' => 'some param' ], // payload, if needed 'method' => 'patch'// if needed, POST by default ])->to('container');
More info about notification options
Helper function also available:
alert('title', 'message', 'info')->to('container');
Messages allowed to include basic HTML:
alert('title', '<a href="/path">message</a>', 'info')->to('container');
Contributing
Please see contributing.md for details and a todolist.
Security
If you discover any security related issues, please email :author_email instead of using the issue tracker.
Credits
License
GNU General Public License v3.0. Please see the license file for more information.