2017 © Pedro Peláez
 

library laravel-app4less

Laravel Providers and DB Migration for App4Less APPs

image

webimpacto/laravel-app4less

Laravel Providers and DB Migration for App4Less APPs

  • Thursday, May 10, 2018
  • by webimpacto
  • Repository
  • 1 Watchers
  • 0 Stars
  • 11 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 22 % Grown

The README.md

App4Less push notifications channel for Laravel

This package makes it easy to send app4less/reskyt push notifications with Laravel., (*1)

Installation

You can install the package via composer:, (*2)

``` bash composer require webimpacto/laravel-app4less, (*3)


First you must install the service provider (skip for Laravel>=5.5): ``` php // config/app.php 'providers' => [ ... \Webimpacto\LaravelApp4Less\Providers\App4LessServiceProvider::class, ],

Launch artisan migrate, to create the Database Tables. ``` bash php artisan migrate, (*4)


Add the \Webimpacto\LaravelApp4Less\Middleware\App4lessSaveToken middleware to web group in the Http Kernel, this will be store the tokens in App4less table. ``` php // app/Http/Kernel.php protected $middlewareGroups = [ ... \Webimpacto\LaravelApp4Less\Middleware\App4lessSaveToken::class ],

Set .env variables for you App user and App API KEY if you want to send Push Notifications, (*5)

``` php APP4LESS_USER=userapp APP4LESS_APIKEY=user_api_key, (*6)



## Usage Now you can use the channel in your via() method inside the notification as well as send a app4less push notification: ``` php use Illuminate\Notifications\Notification; use Webimpacto\LaravelApp4Less\Channel\App4LessPushChannel; use Webimpacto\LaravelApp4Less\Channel\App4LessPushMessage; class AccountApproved extends Notification { public function via($notifiable) { return [App4LessPushChannel::class]; } public function toApp4LessPush($notifiable) { $user = User::find($this->friend->user_from); return (new App4LessPushMessage) ->title('Notification Title') ->url('Notification URL') ->utm('UTM-Analytics'); } }

The Versions

10/05 2018

dev-master

9999999-dev

Laravel Providers and DB Migration for App4Less APPs

  Sources   Download

MIT

The Requires

 

by Pablo Martin

10/05 2018

1.0.0

1.0.0.0

Laravel Providers and DB Migration for App4Less APPs

  Sources   Download

MIT

The Requires

 

by Pablo Martin