2017 © Pedro Peláez
 

library laravel-notificator

Attach objects to notification's session flashed variable

image

lloople/laravel-notificator

Attach objects to notification's session flashed variable

  • Thursday, February 8, 2018
  • by lloople
  • Repository
  • 1 Watchers
  • 1 Stars
  • 122 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 16 Versions
  • 2 % Grown

The README.md

Laravel Notificator

Simple session flashing messages manager for Laravel, (*1)

Notifications are stored in Laravel's session flash input, keyed by notifications, (*2)

Create a notification

Notificator::success('This is a success notification');

You can choose between 4 types - success - info - error - warning, (*3)

@foreach(Notificator::all() as $notification)
    <div class="alert alert-{{ $notification->getBootstrapClass() }}>
        <p>{{ $notification->getMessage() }}</p>
    </div>
@endforeach

getBootstrapType() transforms the error type into danger to use it with Bootstrap default CSS alerts. If you're not using Bootstrap, you can use getType to get it as error., (*4)

If you just want the first notification or you know you'll work with just one, you can use, (*5)

 Notificator::first()->getMessage();

Duration

Notification's Messages also have an integer $duration in case you use a javscript library like toastr.js, (*6)

You can modify the default duration of 5 seconds when creating the notification, (*7)

Notificator::success('Message', 10000); // 10 seconds

The Versions

08/02 2018

dev-develop

dev-develop

Attach objects to notification's session flashed variable

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar lloople

08/02 2018

dev-master

9999999-dev

Attach objects to notification's session flashed variable

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar lloople

08/02 2018

v1.6.0

1.6.0.0

Attach objects to notification's session flashed variable

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar lloople

08/02 2018

dev-release/v1.6.0

dev-release/v1.6.0

Attach objects to notification's session flashed variable

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar lloople

16/12 2017

v1.5.3

1.5.3.0

Attach objects to notification's session flashed variable

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar lloople

16/12 2017

dev-release/v1.5.3

dev-release/v1.5.3

Attach objects to notification's session flashed variable

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar lloople

16/12 2017

v1.5.2

1.5.2.0

Attach objects to notification's session flashed variable

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar lloople

16/12 2017

v1.5.1

1.5.1.0

Attach objects to notification's session flashed variable

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar lloople

05/10 2017

dev-feature/add_test_coverage

dev-feature/add_test_coverage

Attach objects to notification's session flashed variable

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

by Avatar lloople

05/10 2017

dev-feature/notificator_messages_retrieving

dev-feature/notificator_messages_retrieving

Attach objects to notification's session flashed variable

  Sources   Download

MIT

The Requires

  • php >=7.0

 

by Avatar lloople

28/06 2017

v1.5

1.5.0.0

Attach objects to notification's session flashed variable

  Sources   Download

MIT

The Requires

  • php >=7.0

 

by Avatar lloople

28/04 2017

v1.4

1.4.0.0

Attach objects to notification's session flashed variable

  Sources   Download

MIT

The Requires

  • php >=7.0

 

by Avatar lloople

11/04 2017

v1.3

1.3.0.0

Attach objects to notification's session flashed variable

  Sources   Download

MIT

The Requires

  • php >=7.0

 

by Avatar lloople

11/04 2017

v1.2-stable

1.2.0.0

Attach objects to notification's session flashed variable

  Sources   Download

MIT

The Requires

  • php >=7.0

 

by Avatar lloople

11/04 2017

v1.1-stable

1.1.0.0

Attach objects to notification's session flashed variable

  Sources   Download

MIT

The Requires

  • php >=7.0

 

by Avatar lloople

11/04 2017

v1.0

1.0.0.0

Attach objects to notification's session flashed variable

  Sources   Download

MIT

The Requires

  • php >=7.0

 

by Avatar lloople