GithubHelp home page GithubHelp logo

notifier's Introduction

Notifier Component for Orchestra Platform

Notifier Component add a simplify approach to notifier the application user using mail (or other notification service) that is managed using Orchestra\Notifier\NotifierManager.

tests Latest Stable Version Total Downloads Latest Unstable Version License Coverage Status

Version Compatibility

Laravel Notifier
5.5.x 3.5.x
5.6.x 3.6.x
5.7.x 3.7.x
5.8.x 3.8.x
6.x 4.x
7.x 5.x
8.x 6.x

Installation

To install through composer, run the following command from terminal:

composer require "orchestra/notifier"

Configuration

Add following service providers in config/app.php.

'providers' => [

    // ...

    Orchestra\Notifier\NotifierServiceProvider::class,

],

notifier's People

Contributors

crynobone avatar ahmadshah avatar it-can avatar

Stargazers

Suke Han avatar Berkay UNAL avatar Steve Bauman avatar  avatar Niels Stampe avatar  avatar

Watchers

 avatar James Cloos avatar  avatar

notifier's Issues

[Insight] Object parameters should be type hinted - in src/Notifier/LaravelNotifier.php, line 40

in src/Notifier/LaravelNotifier.php, line 40

The parameter mail, which is an object, should be typehinted.

        $view    = $message->view;
        $data    = $message->data;
        $subject = $message->subject;

        // Send the email directly using Illuminate\Contracts\Mail\Mailer interface.
        $this->mailer->send($view, $data, function ($mail) use ($user, $subject, $callback) {
            // Set the recipient detail.
            $mail->to($user->getRecipientEmail(), $user->getRecipientName());

            // Only append the subject if it was provided.
            ! empty($subject) && $mail->subject($subject);

Posted from SensioLabsInsight

[Insight] Unused use statement should be avoided

in src/Orchestra/Notifier/OrchestraNotifier.php, line 5

The class Illuminate\Auth\Reminders\RemindableInterface is declared but never used. You should remove the use statement.

<?php namespace Orchestra\Notifier;

use Closure;
use Orchestra\Memory\Abstractable\Container;
use Illuminate\Auth\Reminders\RemindableInterface;
use Illuminate\Support\SerializableClosure;

class OrchestraNotifier extends Container implements NotifierInterface
{
    /**

Posted from SensioLabsInsight

[Insight] Object parameters should be type hinted - in src/Notifier/OrchestraNotifier.php, line 50

in src/Notifier/OrchestraNotifier.php, line 50

The parameter message, which is an object, should be typehinted.

        // exception.
        $callback = ($callback instanceof Closure ? new SerializableClosure($callback) : $callback);

        // Send the notification using push which would allow Orchestra
        // Platform to choose either to use queue or send.
        $receipt = $this->mailer->push($view, $data, function ($message) use ($user, $subject, $callback) {
            // Set the recipient detail.
            $message->to($user->getRecipientEmail(), $user->getRecipientName());

            // Only append the subject if it was provided.
            ! empty($subject) && $message->subject($subject);

Posted from SensioLabsInsight

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.