shanto75 / laranotify
notification package
Installs: 3
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Language:Blade
pkg:composer/shanto75/laranotify
Requires
- php: >=7.4
README
A simple but beautiful notification package for Laravel
Installation
Install Laranotify with composer
composer require shanto75/laranotify
Configuration
Service Provider Registration
In config/app.php, add in providers array -
'providers' => [ // ... Shanto75\\Laranotify\\LaranotifyServiceProvider::class, // ... ],
Facade Class Alias Add in aliases array -
'aliases' => Facade::defaultAliases()->merge([ // ... 'Laranotify' => Shanto75\\Laranotify\\Laranotify::class, // ... ])->toArray(),
Include assets Add it into the top of root file app.blade.php -
@include('laranotify::laranotify')
Import first the Laranotify facade
use Shanto75\Laranotify\Facades\Laranotify;
Example #01-
namespace App\Http\Controllers; use Illuminate\Http\Request; use Shanto75\Laranotify\Facades\Laranotify; class HomeController extends Controller { public function index(){ Laranotify::notify('Saved successfully!'); return view('welcome'); } }