Download the PHP package nguyentrigiang/laravel-notification without Composer
On this page you can find all versions of the php package nguyentrigiang/laravel-notification. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nguyentrigiang/laravel-notification
More information about nguyentrigiang/laravel-notification
Files in nguyentrigiang/laravel-notification
Package laravel-notification
Short Description A Package for management notification with jsonapi specification
License MIT
Homepage https://github.com/giangnguyentri/notifications
Informations about the package laravel-notification
Introduction
This is a simple Notification wrapper library for Laravel. It simplifies the basic notification flow with the defined methods. You can send a message to all users or you can notify a single user, manage notifications, devices ID, and configure time to receive notifications.
Installation
First, you'll need to require the package with Composer:
The package will automatically register a service provider.
Then, run php artisan vendor:publish --provider="GiangNT\LaravelNotification\NotificationServiceProvider"
from your command line to publish the notification migration file.
Finally, from the command line again, run
Configuration
If you use Onesignal, run
to publish the default configuration file. This will publish a configuration file named onesignal.php which includes your OneSignal authorization keys.
You need to fill in onesignal.php file that is found in your applications config directory. app_id is your OneSignal App ID and rest_api_key is your REST API Key.
USAGE
Preparing your model:
To associate notification with a model, the model must implement the following interface and trait
Creating Notifications:
Extends GiangNT\LaravelNotification\BaseNotification
instead of Illuminate\Notifications\Notification