Web Push Notifications brought to Yii2

Overview

Web Push Notifications for Yii 2


An extension for implementing Web Push Notifications on your website in a breeze.

Documentation is at docs/README.md

Latest Stable Version Total Downloads tests

Installation

The preferred way to install this extension is through composer.

php composer.phar require --prefer-dist machour/yii2-web-push-notification

Configuration

DB

This module use the following tables:

Name Role
{{%wpn_app}} Represents a Web Push application
{{%wpn_subscription}} Represents a Web Push subscriber
{{%wpn_campaign}} Represents a Web Push campaign (ie, a push you've scheduled or sent)
{{%wpn_report}} Links a subscriber to a push (received ? errored ? ..)

Use the following migration to create them:

 ./yii migrate --migrationPath=vendor/machour/yii2-web-push-notifications/src/migrations/

Web

Add this module to your \yii\web\Application config file :

return [
   // ...
    'modules' => [
        'wpn' => [
            'class' => 'machour\yii2\wpn\Module',
        ],
        // ...
    ],
];

Console

Add this module to your \yii\console\Application config file :

return [
    // ...
    'bootstrap' => [..., 'wpn'],
    // ...
        'modules' => [
        'wpn' => [
            'class' => 'machour\yii2\wpn\Module',
        ],
        // ...
    ],
]

You can now register a new application using the ./yii wpn/app/create console command. Arguments are as follow:

USAGE

yii wpn/app/create <name> <host> <subject> [...options...]

- name (required): string
  The application name

- host (required): string
  The hostname where the application will be deployed

- subject (required): string
  The contact for the application. Needs to be a URL or a mailto: URL.
  This provides a point of contact in case the push service needs to contact you
You might also like...
An enhanced Yii 2 widget encapsulating the HTML 5 range input (sub repo split from yii2-widgets)
An enhanced Yii 2 widget encapsulating the HTML 5 range input (sub repo split from yii2-widgets)

yii2-widget-rangeinput The RangeInput widget is a customized range slider control widget based on HTML5 range input. The widget enhances the default H

A Yii2 module for embedding social plugins and widgets.
A Yii2 module for embedding social plugins and widgets.

yii2-social Module that enables access to social plugins for Yii Framework 2.0. It includes support for embedding plugins from the following networks

Pug Yii2 adapter

Yii 2 Pug (ex Jade) extension This extension provides a view renderer for Pug templates for Yii framework 2.0 applications. Support GutHub issues Inst

This is Yii2 utilities

YII2-UTILITY This is Yii2 utilities. Requirements PHP = 7.4 Curl extension for PHP7 must be enabled. Download Using Composer From your project direct

Alejandro Flores, Php Yii2 Emoac

Prueba Tecnica Emoac Proyecto basado en PHP con Yii2. Hecho por Alejandro Flores, Ingeniero en informática. Este proyecto consta de un CRUD de product

FlyCubePHP is an MVC Web Framework developed in PHP and repeating the ideology and principles of building WEB applications, embedded in Ruby on Rails.

FlyCubePHP FlyCubePHP is an MVC Web Framework developed in PHP and repeating the ideology and principles of building WEB applications, embedded in Rub

A PHP framework for web artisans.

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs.

Slim Framework Slim is a PHP micro-framework that helps you quickly write simple yet powerful web applications and APIs. Installation It's recommended

Comments
  • Look into Safari push notifications

    Look into Safari push notifications

    Relevant documentation: https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/NotificationProgrammingGuideForWebsites/PushNotifications/PushNotifications.html#//apple_ref/doc/uid/TP40013225-CH3-SW1

    opened by machour 0
  • Documentation

    Documentation

    Provide a thorough guide for WPN.

    Resources:

    • https://github.com/web-push-libs/web-push-php
    • https://autopush.readthedocs.io/en/latest/http.html#error-codes
    • https://web-push-book.gauntface.com/
    • https://github.com/Minishlink/web-push-php-example
    opened by machour 0
Releases(1.0.0-alpha1)
Owner
Mehdi Achour
Mehdi Achour
Simple RBAC Manager for Yii2 (minify of yii2-admin)

Yii2 Mimin Simple RBAC Manager fo Yii 2.0. Minify of yii2-admin extension with awesome features Attention Before you install and use this extension, t

Hafid Mukhlasin 52 Sep 22, 2022
Tarantool connector for yii2 framework. Allow to use activerecord, schemas, widgets and more.

Tarantool connector for yii2 framework Tarantool connector for yii2 framework. Allow to use framework abstractions such as ActiveRecord, Schema, Table

Andrey 11 Nov 21, 2021
yii2-app-advanced with Twitter Bootstrap 5

Yii 2 Advanced Project Template is a skeleton Yii 2 application best for developing complex Web applications with multiple tiers.

Nedarta 1 Nov 5, 2021
Prometheus exporter for Yii2

yii2-prometheus Prometheus Extension for Yii 2 This extension provides a Prometheus exporter component for Yii framework 2.0 applications. This extens

Mehdi Achour 3 Oct 27, 2021
Yii2-symfonymailer - Yii 2 Symfony mailer extension.

Yii Mailer Library - Symfony Mailer Extension This extension provides a Symfony Mailer mail solution for Yii framework 2.0. For license information ch

Yii Software 28 Dec 22, 2022
Yii2 console application used to write our processors of methods to responsible to client calling.

Microservice Application Skeleton Yii2 console application used to write our processors of methods to responsible to client calling. This application

Jafaripur 0 Mar 10, 2022
Date/Time Picker widget for Yii2 framework Based on Eonasdan's Bootstrap 3 Date/Time Picker

Yii2 Date/Time Picker Widget Date/Time Picker widget for Yii2 framework Based on Eonasdan's Bootstrap 3 Date/Time Picker Demo Since this is a part of

Yevhen Terentiev 8 Mar 14, 2022
Yii2 extension for format inputs based on AutoNumeric.js

Yii2 extension for format inputs based on AutoNumeric.js

extead 2 Oct 7, 2019
Yii2 SwitchInput widget turns checkboxes and radio buttons into toggle switchinputes

Yii2 SwitchInput widget turns checkboxes and radio buttons into toggle switchinputes

Kartik Visweswaran 38 Sep 21, 2022
An enhanced FileInput widget for Bootstrap 4.x/3.x with file preview, multiple selection, and more features (sub repo split from yii2-widgets)

yii2-widget-fileinput The FileInput widget is a customized file input widget based on Krajee's Bootstrap FileInput JQuery Plugin. The widget enhances

Kartik Visweswaran 227 Nov 6, 2022