Download the PHP package codewiser/postie without Composer

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

Postie

Postie is a dashboard where users can manage their subscription preferences.

Every Notification in application has corresponding audience. It doesn't mean, that everyone from audience will receive a notification, but it is possible. So, Postie allows user to decide what channels he or she wants to be used to deliver notification.

Installation

Install Postie into your project using the Composer package manager:

composer require codewiser/postie

After installing Postie, publish its assets using the postie:install Artisan command:

php artisan postie:install

Before running migrations you may want to change name of the table, that keeps user subscription preferences. Then see config/postie.php.

After you configured table name run migrations:

php artisan migrate

Configuration

After installing Postie, its service provider will be located at App\Proviers\PostieServiceProvider.

First, provide information about every Notification, that users may manage. Every subscription requires list of available channels and possible audience (as builder).

Second, replace Notification::via() method with \Codewiser\Postie\Notifications\Traits\Channelization trait. Notification will use list of channels defined in associated Subscription.

Subscription Definition

Subscription is an object, that helps you describe application notification for Postie to understand.

Initially, it is enough to pass notification class name, query builder with users, who may receive such notification and channels list, supported by notification.

Moreover, you may define notification title and description.

Channel Definition

When you set up Subscription, you may pass channel as a simple string. But there are a way to define more complex channel representation.

You may use \Codewiser\Postie\Channel object to describe channel with custom title, icon etc.:

You may define default state of channel. If channel is active, then all users will receive notifications through this channel until they unsubscribe. Vice versa, if channel is passive, all users will not receive notifications via this channel until they subscribe to it.

Default channel state is active.

If you want to disable user ability to manage channel preferences, you may hide channel form user interface, or just force channel state.

Grouping Subscriptions

You may group subscriptions to create side menu for dashboard. Subscriptions inherit channels and audience form a group, if defined.

Previewing Notifications

You may define notification preview. So user can see how notification will be looks like.

Notification preview may be composed with model factories...

Sending Notifications

Using Postie, you may simply send notification without defining notifiables, as Postie already knows subscribers.

If you need to limit notifiables, you may use a callback:

You still may send notifications using Facade or notify() method. As Notification uses Channelization trait, it will respect user preferences.


All versions of postie with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.0
laravel/framework Version >=10.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 codewiser/postie contains the following files

Loading the files please wait ....