hocza just released a new package that we can use to simplify the management of site-wide announcements.

manage laravel

With "Laravel Announcement" you can display auto-expiring announcements. To achieve this the package simply uses the Redis's TTL.

Installation

Install this package using:

composer require laravelhungary/announcement

and

composer require predis/predis

Add the followings to config/app.php:

to the providers array

LaravelHungary\Announcement\PackageServiceProvider::class,

to the aliases array

'Announce' => LaravelHungary\Announcement\Facades\Announce::class,