Download the PHP package eugenefvdm/notification-subscriptions without Composer

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

Notification Subscriptions

Tests Downloads

Notification Subscriptions is a Laravel package that may be used to keep track of repeat emails, delayed emails, and unsubscribing of email notifications.

The package makes use of Laravel's built-in event listeners NotificationSending and NotificationSent to automatically subscribe and to determine if and when a message should be sent.

Categorization of emails and model specific subscriptions are possible.

Requirements

Installation

After installing the package, run the migrations:

This will create the notification_templates and notification_subscriptions tables.

If you want to customize the unsubscribe link or unsubscribed confirmation blade, publish the views:

User Model

Add the HasNotificationSubscriptions trait to your User model:

Usage

Generate notifications as per usual using php artisan:

Extend the newly created notification with the BaseNotification class:

Repeat Settings

In your notification class, add any or all of the following variables to do repeated notifications:

Delayed Sending

To wait a certain amount of time before sending a notification, set initialDelay in your constructor:

Categorization

All new messages without an explicit category assignment will be assigned to the default category in the database.

To specify a custom category, use $category:

Model Specific Subscriptions

Notifications are typically tied to a user, but at times one wants to associate a notification to both a user and another model. For example, you might have a products table, and you want a user to be subscribed to a price notification for specific Product models. Here's how:

Unsubscribe

Any new notification will be automatically subscribed when used the first time.

Adding the Unsubscribe Link in Blades

For unsubscribe links, modify the toMail method in the notification class:

Then add this to your blade:

The invokable controller for unsubscribe will direct the user to a generic unsubcribed.blade.php file that may be customized. The variables returned to this blade are:

Possible $message values are:

Testing

License

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

Alternatives


All versions of notification-subscriptions with dependencies

PHP Build Version
Package Version
Requires laravel/framework Version ^10.0|^11.0|^12.0
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 eugenefvdm/notification-subscriptions contains the following files

Loading the files please wait ....