Download the PHP package pschocke/laravel-notification-settings without Composer

On this page you can find all versions of the php package pschocke/laravel-notification-settings. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-notification-settings

Laravel Notification Settings

Latest Version on Packagist GitHub Tests Action Status Total Downloads

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.

Installation

You can install the package via composer:

Publish and run the migration:

Publish the config file:

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:

If you want to configure different settings for different models, just add a setting in the array:

If you want to have different settings for different notification channels for a model, simply add an array with the notification key and the settings:

Prepare your model

All models that should have notification settings need to use the pschocke\NotificationSettings\HasNotificationSettings trait.

Add a new NotificationSetting to a model

To add a notification Channel to a model, just call the saveNotificationSetting() method on that model with the array of settings:

Sending notifications

To send a notification to a model, just call the sendNotification() method on the model. The notification will be send through all channels that have the setting on true:

Write your own notification Handler

Just sending notifications via email might be enough, but some times you want to send notifications via other channels too. Luckily, adding more handler is a breeze. Just create a new handler that implements the pschocke\NotificationSettings\Handler\HandlerInterface and extends the pschocke\NotificationSettings\Handler base class.

Just take a look at this handler that sends slack notifications:

After adding the handler you just need to add it to the handlers array in your config file:

Testing

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-notification-settings with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4
illuminate/support Version ~6|~7|~8
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package pschocke/laravel-notification-settings contains the following files

Loading the files please wait ....