Skip to content

A notification service to retrive all notification from your model and store it in an array for transactions. this would be helpful to your controller class when developing an in-app real-time notifier, this notification service also give your controller a logic-less, magic delete method

Notifications You must be signed in to change notification settings

omoh09/notification_service

Repository files navigation

A Laravel customed Notification service

This service extends an interface which gets and store all notification in your app to an array and also find and delte a user by its index,

In your project

mkdir app/Repository/NotificationRepository 

Copy the notication interface and class

cp NotificationInterface & NotificationRepository to app/Repository/NotificationRepository 

you will need to create a notification method on the model you are notifying

namespace App\Models

class Xmodel {
    public function notification(){
        //
    }
}

Then use the register method in the appserviceprovider and bind the NOtification interface and the notification class

php artisan make:notification example_class_to_notify 
php artisan migrate

I am open for projects

  • **THank you **

About

A notification service to retrive all notification from your model and store it in an array for transactions. this would be helpful to your controller class when developing an in-app real-time notifier, this notification service also give your controller a logic-less, magic delete method

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published