Download the PHP package juzaweb/notification without Composer

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

Juzaweb CMS Notification Module

This package provides notification management functionality with support for registering and managing different recipient types and notification channels.

Features

Installation

The package is auto-registered via Laravel's service provider discovery.

Usage

Registering Notification Channels

You can register notification channels in your service provider's boot() method:

Registering Recipient Types

You can register recipient types in your service provider's boot() method:

Creating Custom Recipient Types

You can create your own custom recipient type classes by implementing RecipientTypeInterface:

Creating Custom Notification Channels

Create notification channels by implementing NotificationChannelInterface:

Getting Recipient Types

Getting Notification Channels

Using in Views

In your controller:

In your Blade view:

Subscriptable Channels

Mark channels as subscriptable to allow users to subscribe/unsubscribe:

Sending Bulk Notifications

Use the SendNotificationJob to send notifications to multiple recipients:

The job will:

  1. Get recipients from the registered recipient type
  2. Process recipients in chunks to avoid memory issues
  3. Send notifications via specified channels
  4. Update the sent_at timestamp when complete

Bulk Actions in Admin Panel

From the admin panel, you can select multiple notifications and perform bulk actions:

API Reference

NotificationManager Methods

registerRecipientType(string $key, callable $callback): self

Register a new recipient type.

Parameters:

Returns: self for method chaining

Example:


registerChannel(string $key, callable $callback): self

Register a new notification channel.

Parameters:

Returns: self for method chaining

Example:


getRecipientTypes(): array<string, RecipientTypeInterface>

Get all registered recipient types as objects.

Returns: Array of RecipientTypeInterface objects indexed by key


getRecipientTypesArray(): array<string, array>

Get all registered recipient types as arrays (useful for views).

Returns: Array of arrays with label and description for each type


getRecipientType(string $key): ?RecipientTypeInterface

Get a specific recipient type by key.

Parameters:

Returns: RecipientTypeInterface object or null if not found


hasRecipientType(string $key): bool

Check if a recipient type is registered.

Parameters:

Returns: true if exists, false otherwise


unregisterRecipientType(string $key): self

Remove a recipient type.

Parameters:

Returns: self for method chaining


getChannels(): array<string, NotificationChannelInterface>

Get all registered channels as objects.

Returns: Array of NotificationChannelInterface objects indexed by key


getChannelsArray(): array<string, array>

Get all registered channels as arrays (useful for views).

Returns: Array of arrays with label and description for each channel


hasChannel(string $key): bool

Check if a channel is registered.

Parameters:

Returns: true if exists, false otherwise


unregisterChannel(string $key): self

Remove a channel.

Parameters:

Returns: self for method chaining


subscriptable(string $channel, array $data = []): void

Mark a channel as subscriptable, allowing users to subscribe or unsubscribe.

Parameters:

Example:


getSubscriptableChannels(): array<string>

Get all channels marked as subscriptable.

Returns: Array of channel keys that are subscriptable

Example:


getSubscriptableData(string $channel): array<string, mixed>

Get the subscriptable configuration data for a specific channel.

Parameters:

Returns: Array of configuration data for the channel, or empty array if not found

Example:


RecipientTypeInterface

Interface that all recipient type classes must implement.

getLabel(): string

Get the display label for the recipient type.


getDescription(): ?string

Get the description for the recipient type (optional).


toArray(): array

Convert the recipient type to an array representation.

Returns: Array with label and description keys


getRecipients(): \Illuminate\Database\Eloquent\Builder

Get the Eloquent query builder for fetching recipients.

Returns: Eloquent Builder instance that can be used to fetch recipients

Example:


NotificationChannelInterface

Interface that all notification channel classes must implement.

getLabel(): string

Get the display label for the notification channel.


getDescription(): ?string

Get the description for the notification channel (optional).


toArray(): array

Convert the notification channel to an array representation.

Returns: Array with label and description keys


Examples

Complete Recipient Type Implementation

Sending Notifications with Error Handling

Unregistering Types and Channels

License

Same as the main application license.


All versions of notification with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0|^8.1
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 juzaweb/notification contains the following files

Loading the files please wait ...