2017 © Pedro Peláez
 

library notifications

Notification messages system

image

infinety-es/notifications

Notification messages system

  • Saturday, June 25, 2016
  • by Krato1
  • Repository
  • 1 Watchers
  • 0 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Laravel 5 Notifications

Latest Version on Packagist Total Downloads ![Software License][ico-license] StyleCI, (*1)

A package to manage Notifications

With this package you can send notifications to your model. You can choose if you want users, or whatever model., (*2)

Notifications are saved on notifications and each item of your model can retrieve it. Also you can set each notification as read., (*3)

Installation

Install via composer: composer require infinety-es\notifications, (*4)

Then register the service provider in config/app.php inside providers array:, (*5)

Infinety\Notifications\NotificationsServiceProvider::class,

Publish package files:, (*6)

php artisan vendor:publish --provider="Infinety\Notifications\NotificationsServiceProvider"

Tip: You can also publish only this tags: config, views and migrations, (*7)

After modify config\notifications.php file NotificationTraitto your model. For example User model:, (*8)

<?php
namespace App;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Infinety\Notifications\Traits\NotificationTrait;

class User extends Authenticatable
{

    use NotificationTrait;

Use

In your browser go to notifications. Example: www.infinety.app/notifications., (*9)

Default pages are in resources\views\vendor\notifications. You can view and create notifications with a simple interface. You can modify everything., (*10)

Command

You can create notifications by artisan with command:, (*11)

php artisan notifications:new

You have some options you need to add. If not, the command will ask you. Options are:, (*12)

--notify[=NOTIFY]    A model ID, or all
--subject[=SUBJECT]  Notification subject
--message[=MESSAGE]  Notification message
--type[=TYPE]        Type of notifications defined in config file

Trait Methods

Get all notifications

    /**
     * Get All Notifications. Readed or not
     *
     * @return Eloquent
     */
    public function notifications()

This method retrieves all notifications read and not read notifications, (*13)

Get not read notifications

    /**
     * Get not read notifications
     *
     * @return Eloquent
     */
     public function getNotReadNotifications()

This method retrieves not read notifications, (*14)

Get read notifications

    /**
     * Get read Notifications
     *
     * @return Eloquent
     */
    public function getReadNotifications()

This method retrieves read notifications. It's great if you want to show history., (*15)

Get count of all notifications

    /**
     * Get Count of all Notifications
     *
     * @return integer
     */
    public function getAllNotificationCount()

Get count of all notifications including read and not read., (*16)

Get count of not read notifications

    /**
     * Get Count of not read Notifications
     *
     * @return integer
     */
    public function getNotReadNotificationCount()

Get count of all notifications not read., (*17)

Contributing

All contributions (in the form on pull requests, issues and feature-requests) are welcome. See the contributors page for all contributors., (*18)

License

Laravel 5 Notifications is an open-sourced laravel package licensed under the MIT License (MIT). Please see the license file for more information., (*19)

The Versions

25/06 2016

dev-master

9999999-dev

Notification messages system

  Sources   Download

MIT

The Requires

 

The Development Requires

by Juan Heymowski

laravel messages laravel 5 notifications

24/06 2016

1.0.1

1.0.1.0

Notification messages system

  Sources   Download

MIT

The Requires

 

The Development Requires

by Juan Heymowski

messages notifications

24/06 2016

1.0

1.0.0.0

Notification messages system

  Sources   Download

MIT

The Requires

 

The Development Requires

by Juan Heymowski

messages notifications