2017 © Pedro Peláez
 

library laravel-notify

Elegant notifications to laravel with Toastr or PNotify

image

helmesvs/laravel-notify

Elegant notifications to laravel with Toastr or PNotify

  • Wednesday, June 13, 2018
  • by helmesvs
  • Repository
  • 5 Watchers
  • 37 Stars
  • 470 Installations
  • CSS
  • 0 Dependents
  • 0 Suggesters
  • 6 Forks
  • 2 Open issues
  • 6 Versions
  • 31 % Grown

The README.md

Laravel Notify

Elegant notifications to laravel with Toastr or PNotify, (*1)

alt text, (*2)

Installation

  1. Either run composer require helmesvs/laravel-notify or add "helmesvs/laravel-notify" to the require key in composer.json and run composer install.
  2. Add Helmesvs\Notify\NotifyServiceProvider::class, to the providers key in config/app.php.
  3. Add 'Notify' => Helmesvs\Notify\Facades\Notify::class, to the aliases key in config/app.php.
  4. Run php artisan vendor:publish --provider="Helmesvs\Notify\NotifyServiceProvider" --tag="notify" to publish the config file.
  5. Include the output {!! Notify::render() !!} in your master view template.
  6. Optional: Modify the configuration file located in config/notify.php.

Usage

Call one of these methods in your controllers to insert a notification: - Notify::warning($message, $title = null, $options = []) - add a warning notification - Notify::error($message, $title = null, $options = []) - add an error notification - Notify::info($message, $title = null, $options = []) - add an info notification - Notify::success($message, $title = null, $options = []) - add a success notification - Notify::add($type: warning|error|info|success, $message, $title = null, $options = []) - add a notification - Notify::clear() - clear all current notification, (*3)

Configuration

Open config/notify.php to adjust package configuration. If this file doesn't exist, run php artisan vendor:publish --provider="Helmesvs\Notify\NotifyServiceProvider" --tag="notify" to create the default configuration file., (*4)

General Options

``` php 'options' => [ 'lib' => 'toastr', 'style' => 'custom' ], (*5)


Set `'lib'` as `toastr` to use [toastr.js](https://github.com/CodeSeven/toastr) or `pnotify` to use [pnotify.js](https://github.com/sciactive/pnotify). Set `'style'` to `'custom'` to use custom settings, or as `'default'` to default library settings. The style of notifications can be customized in `public/vendor/Notify/style.css`. ### Options Toastr ``` php 'ToastrOptions' => [ "closeButton" => false, "closeHtml" => '', "newestOnTop" => true, "progressBar" => false, ... ]

Options PNotify

php 'PNotifyOptions' => [ 'title_escape' => false, 'text_escape' => false, 'styling' => 'brighttheme', 'addclass' => '', ... ], (*6)

For a list of available options, see toastr.js' documentation and pnotify.js' documentation., (*7)

The Versions

13/06 2018

dev-master

9999999-dev https://github.com/Helmesvs/laravel-notify

Elegant notifications to laravel with Toastr or PNotify

  Sources   Download

MIT

The Requires

 

by Helmes V. Santos

laravel php notification pnotify toastr notify

17/10 2017

v1.1.0

1.1.0.0 https://github.com/Helmesvs/laravel-notify

Elegant notifications to laravel with Toastr or PNotify

  Sources   Download

MIT

The Requires

 

by Helmes V. Santos

laravel php notification pnotify toastr notify

04/10 2017

dev-pacote-valido

dev-pacote-valido https://github.com/Helmesvs/laravel-notify

Elegant notifications to laravel with Toastr or PNotify

  Sources   Download

MIT

The Requires

 

by Helmes V. Santos

laravel php notification pnotify toastr notify

04/10 2017

v1.0.2

1.0.2.0 https://github.com/Helmesvs/laravel-notify

Elegant notifications to laravel with Toastr or PNotify

  Sources   Download

MIT

The Requires

 

by Helmes V. Santos

laravel php notification pnotify toastr notify

02/10 2017

v1.0.1

1.0.1.0 https://github.com/Helmesvs/laravel-notify

Elegant notifications to laravel with Toastr or PNotify

  Sources   Download

MIT

The Requires

 

by Helmes V. Santos

laravel php notification pnotify toastr notify

02/10 2017

v1.0.0

1.0.0.0 https://github.com/Helmesvs/laravel-notify

Elegant notifications to laravel with Toastr or PNotify

  Sources   Download

MIT

The Requires

 

by Helmes V. Santos

laravel php notification pnotify toastr notify