PHPackages                             pschocke/laravel-notification-settings - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. pschocke/laravel-notification-settings

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

pschocke/laravel-notification-settings
======================================

Let users decide on what event they want to be notified over which way

0.1(5y ago)1631[1 issues](https://github.com/pschocke/laravel-notification-settings/issues)MITPHPPHP ^7.4CI failing

Since Oct 17Pushed 2y ago1 watchersCompare

[ Source](https://github.com/pschocke/laravel-notification-settings)[ Packagist](https://packagist.org/packages/pschocke/laravel-notification-settings)[ Docs](https://github.com/pschocke/laravel-notification-settings)[ RSS](/packages/pschocke-laravel-notification-settings/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

Laravel Notification Settings
=============================

[](#laravel-notification-settings)

[![Latest Version on Packagist](https://camo.githubusercontent.com/11885e9e4a1944f1513877e2f2a32b6a34e45e1fc523d29e302bbebc2286faad/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f707363686f636b652f6c61726176656c2d6e6f74696669636174696f6e2d73657474696e67732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/pschocke/laravel-notification-settings)[![GitHub Tests Action Status](https://camo.githubusercontent.com/c1fb431b49e848404b142a31c1a7d462d200f2a4f03ad2a90231fbfa71835c92/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f707363686f636b652f6c61726176656c2d6e6f74696669636174696f6e2d73657474696e67732f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/pschocke/laravel-notification-settings/actions?query=workflow%3Arun-tests+branch%3Amaster)[![Total Downloads](https://camo.githubusercontent.com/77768880cc7b92cc98eb31987071aa79a295a46509a0b395c11f8abf045b78d6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f707363686f636b652f6c61726176656c2d6e6f74696669636174696f6e2d73657474696e67732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/pschocke/laravel-notification-settings)

This package tries to extend the default laravel notification system by giving models the ability to set individual notification settings for different ways of contact.

```
$model->saveNotificationSettingFromRequest($request);

$model->sendNotification(new OrderReceivedNotification($order); // this model will receive the notification on all channels he has configured
```

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require pschocke/laravel-notification-settings
```

Publish and run the migration:

```
php artisan vendor:publish --provider="pschocke\NotificationSettings\NotificationSettingsServiceProvider" --tag="migrations"
php artisan migrate
```

Publish the config file:

```
php artisan vendor:publish --provider="pschocke\NotificationSettings\NotificationSettingsServiceProvider" --tag="config"
```

Usage
-----

[](#usage)

This package is driver based. By default, it can only send mail notifications. However, adding driver is a breeze.

To configure the package, you first need to publish the configuration file. It looks like this:

```
