Download the PHP package sysmatter/laravel-notification-preferences without Composer

On this page you can find all versions of the php package sysmatter/laravel-notification-preferences. 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-preferences

Laravel Notification Preferences Packaged Moved -> offload-project/laravel-notification-preferences

A Laravel package for managing user notification preferences with support for multiple channels, notification groups, and a structured table output for display.

Features

Requirements

Installation

Publish the config and migrations:

Run migrations:

Uninstalling

To completely remove the package and its data:

Warning: The uninstall command permanently deletes all notification preferences. Make sure to back up your data if needed.

Configuration

Edit config/notification-preferences.php:

Usage

Add Trait to User Model

Option A: Automatic Filtering (Recommended)

All registered notifications in the config will automatically filter channels based on user preferences. No changes needed to your notification classes!

Option B: Explicit Control with Trait

For more control, use the ChecksNotificationPreferences trait in your notification:

Managing Preferences

Bulk Update Operations

The package provides convenient methods for bulk updating notification preferences, making it easy to implement "disable all emails" or "turn off marketing" features.

Available Bulk Methods

Disable/Enable All Notifications in a Group for a Channel

Turn off all marketing emails:

Turn on all system notifications for in-app:

Disable/Enable a Channel Across All Notifications

Turn off all email notifications:

Enable push notifications for everything:

Disable/Enable All Channels for a Notification Type

Turn off all channels for a specific notification:

Enable all channels for security alerts:

Return Values

All bulk methods return the count of preferences updated:

This is useful for providing user feedback:

Forced Channels are Skipped

Bulk operations automatically skip forced channels:

UI Implementation Examples

"Disable All Emails" Button

"Mute Marketing" Toggle

"Notification Type Master Toggle"

Direct Manager Access

You can also use the manager directly:

Building a Preferences UI

Here's a complete example of a preferences page controller:

Table Structure Output

The getNotificationPreferencesTable() method returns data structured for easy UI rendering:

API Endpoints Example

Create a controller to manage preferences:

Routes:

Frontend Example (Inertia/React 19)

Testing with Pest

Testing with Pest

The package includes a comprehensive test suite using Pest.

Test Structure

Example Test

Advanced Features

Forced Channels

Prevent users from disabling critical notifications on certain channels:

Per-Channel Defaults

Set different defaults for each channel:

Cache Management

The package caches preferences for performance. Clear cache when needed:

Contributing

Please see CONTRIBUTING for details.

Security

Please review our security policy for reporting vulnerabilities.

Credits

License

MIT License. See LICENSE file for details.


All versions of laravel-notification-preferences with dependencies

PHP Build Version
Package Version
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 sysmatter/laravel-notification-preferences contains the following files

Loading the files please wait ...