2017 © Pedro Peláez
 

library notify

Laravel 5 Flash Notifications with icons and animations and with a timeout

image

bpocallaghan/notify

Laravel 5 Flash Notifications with icons and animations and with a timeout

  • Tuesday, September 26, 2017
  • by bpocallaghan
  • Repository
  • 3 Watchers
  • 22 Stars
  • 2,491 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 8 Forks
  • 0 Open issues
  • 10 Versions
  • 17 % Grown

The README.md

Notify (Laravel)

Notify alert boxes to the browser with sound and font awesome icons and give it a timeout to fly out. Works great to notify the user after a successful action (CRUD). Flash the information from Laravel or create multiple from javascript., (*1)

Want to see the current package in action, have a look at the project.

Laravel Starter Project (CMS)

Documentation, Installation, and Usage Instructions

First, pull in the package through Composer., (*2)

"require": {
    "bpocallaghan/notify": "3.*"
}

OR, (*3)

composer require bpocallaghan/notify

See the documentation for detailed installation and usage instructions., (*4)

Laravel <5.4 only (Laravel 5.5 has automatic package discovery)

Include the service provider within config\app.php., (*5)

'providers' => [
    Bpocallaghan\Notify\NotifyServiceProvider::class,
];

Add a facade alias or use the globel helper function notify()., (*6)

'aliases' => [
    'Notify' => Bpocallaghan\Notify\Facades\Notify::class,
];

Usage

Within any view file (preferable your master layout)., (*7)

@include('notify::notify')

Within any Controller., (*8)

public function index()
{
    // helper function - default to the 'info'
    notify('Title', 'Description');

    // return object first
    notify()->info('Title', 'Description');

    // via the facade
    Notify::info('Title', 'Description');

    return view('home');
}

The different 'levels' are: - notify()->info('Title', 'Description'); - notify()->success('Title', 'Description'); - notify()->warning('Title', 'Description'); - notify()->error('Title', 'Description');, (*9)

The different arguments: - notify()->info('Title', 'Description', false); // without the icon - notify()->info('Title', 'Description', 'smile-o'); // specify the icon class - notify()->message($level = 'info', $title, $content, $icon, $timeout = 5000) // arguments - notify()->message('info', 'Title', 'Description', 'smile-o'); // specify the type of level - notify()->message('info', 'Title', 'Description', 'smile-o', 10000); // specify the timeout, (*10)

If you need to modify the view partial, you can run:, (*11)

php artisan vendor:publish --provider="Bpocallaghan\Notify\NotifyServiceProvider" --tag=view

The view partial can be found here resources\views\vendor\notify\notify.blade., (*12)

You need to publish the assets., (*13)

php artisan vendor:publish --provider="Bpocallaghan\Notify\NotifyServiceProvider" --tag=public

Find the files here public\vendor\notify\. Move the mp3s to public\sounds\. If you use Laravel Elixir, move the css and js to your resource\assets and include them in your gulpfile.js, otherwise link to the individual files in your html header., (*14)

My other Packages

The Versions

26/09 2017

dev-master

9999999-dev

Laravel 5 Flash Notifications with icons and animations and with a timeout

  Sources   Download

MIT

The Requires

  • php >=7.0.0

 

laravel bootstrap notifications flash notify

26/09 2017

2.1.1

2.1.1.0

Laravel 5 Flash Notifications with icons and animations and with a timeout

  Sources   Download

MIT

The Requires

  • php >=7.0.0

 

laravel bootstrap notifications flash notify

20/09 2017

2.1.0

2.1.0.0

Laravel 5 Flash Notifications with icons and animations and with a timeout

  Sources   Download

MIT

The Requires

  • php >=7.0.0

 

laravel bootstrap notifications flash notify

20/10 2016

2.0.2

2.0.2.0

Laravel 5 Flash Notifications with icons and animations and with a timeout

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

laravel bootstrap notifications flash notify

02/04 2016

2.0.x-dev

2.0.9999999.9999999-dev

Laravel 5 Flash Notifications with icons and animations and with a timeout

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

laravel bootstrap notifications flash notify

02/04 2016

2.0.1

2.0.1.0

Laravel 5 Flash Notifications with icons and animations and with a timeout

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

laravel bootstrap notifications flash notify

02/04 2016

2.0.0

2.0.0.0

Laravel 5 Flash Notifications with icons and animations and with a timeout

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

laravel bootstrap notifications flash notify

01/04 2016

1.2

1.2.0.0

Laravel 5 Flash Notifications for SmartAdmin 1.5.2 and Alert Notifications for SmartAdmin / Bootstrap 3

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

laravel bootstrap notifications flash notify smartadmin

18/04 2015

1.0.1

1.0.1.0

Laravel 5 Flash Notifications for SmartAdmin 1.5.2 and Alert Notifications for SmartAdmin / Bootstrap 3

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

laravel bootstrap notifications flash notify smartadmin

05/04 2015

1.0

1.0.0.0

Laravel 5 Flash Notifications for SmartAdmin 1.5.2 and Alert Notifications for SmartAdmin / Bootstrap 3

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

laravel bootstrap notifications flash notify smartadmin