Download the PHP package mediumart/notifier without Composer

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

Notifier for laravel 5.3+

Build Status Coverage Status License

Description

Laravel offers a really simple way of defining custom channels for your app notifications. You just have to return the channel class name through the via method of any notification: https://laravel.com/docs/5.4/notifications#custom-channels.

However, using the channel class name inside your notifications objects, can become cumbersome sometimes.

This package allow you to return a custom hook name for custom notification channel, instead of the channel class name through the via method of any of your notifications:

Imagine that you have 10 or 30 notifications class in the same app, that need to be send through a given channel, well now each of the notifications class is tighly coupled with your custom channel class, and if you happen to change the channel class name or may be decide to use a different implementation for the same channel, you will have to open all of your 30 notifications one by one in order to update the returned class name in their via method, and that can be very tedious.

And frankly, i find it more exciting and really cool to be able to define a custom hook name, sort of like built in notifications channels like 'mail', or 'slack', or 'database', or whatever...

So if you do like the idea, let's get started!

Installation

Using composer:

If you are using laravel 5.3+ prior to version 5.5, add the service provider in the providers array inside config/app.php

Usage

You need a class that will act as factory for your custom channel. This factory class can be the custom channel class itself if you want, it just need to implements two public static methods: canHandleNotification and createDriver. Both methods receive as their only argument the driver hook name that is to be created.

The first method canHandleNotification should return a Boolean(true or false) to indicate whether or not the factory is able to create the appropriate driver for the notification.

The second method createDriver will be called by the ChannelManager if the first one has returned true on this factory, and therefore, should return a fully resolved instance of the appropriate driver to use.

You can use the provided notifier:channel artisan command to generate your channel class, like in the following example:

A new channel class will be created under app/Notifications/Channels/<channel_class_name>.php.

Now that you have a fully functionnal factory, you need to register it with your application, the easiest way to do that is to create(if not already exists) a public property of type array, named $notificationsChannels inside your App\Providers\AppServiceProvider and list your factory class name in there.

To quickly Taste the package use the Mediumart\Notifier\Examples\FakeScreenChannel example channel.

License

Mediumart Notifier is an open-sourced software licensed under the MIT license.


All versions of notifier with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.4
illuminate/notifications Version ^5.3
illuminate/support Version ^5.3
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 mediumart/notifier contains the following files

Loading the files please wait ....