Download the PHP package enniel/laravel-vk-notification-channel without Composer
On this page you can find all versions of the php package enniel/laravel-vk-notification-channel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download enniel/laravel-vk-notification-channel
More information about enniel/laravel-vk-notification-channel
Files in enniel/laravel-vk-notification-channel
Package laravel-vk-notification-channel
Short Description VK Notification Driver
License MIT
Homepage https://github.com/enniel/laravel-vk-notification-channel
Informations about the package laravel-vk-notification-channel
Vkontakte notification channel for Laravel 5.3
This package makes it easy to send notifications using vk.com with Laravel 5.3.
Contents
- Installation
- Usage
- Available Message methods
- Testing
- Credits
- License
Installation
You can install this package via composer:
Usage
Now you can use the channel in your via()
method inside the notification:
In order for your notice to know who to send messages, you must add routeNotificationForVkontakte
method to your notification model that returns data in array like ['user_id', 1].
Available message methods
user()
: User ID (by default — current user). Takes a parameteruser_id
.random()
: Unique identifier to avoid resending the message. Takes a parameterrandom_id
.peer()
: Destination ID. Takes a parameterpeer_id
.domain()
: User's short address (for example,illarionov
). Takes a parameterdomain_id
.chat()
: ID of conversation the message will relate to. Takes a parameterchat_id
.users()
: IDs of message recipients (if new conversation shall be started). Takes a parameteruser_ids
.message()
: The identity of the sender. Takes a parametermessage
.lat()
: Geographical latitude of a check-in, in degrees (from -90 to 90). Takes a parameterlat
.long()
: Geographical longitude of a check-in, in degrees (from -180 to 180). Takes a parameterlong
.attachment()
: List of objects attached to the message. Takes a parameterattachment
.forwarded()
: IDs of forwarded messages. Takes a parameterforward_messages
.sticker()
: Sticker id. Takes a parametersticker_id
.notification()
:1
ortrue
if the message is a notification (for community messages). Takes a parameternotification
.token()
: Access token. Passes a parameteraccess_token
. For more information see Authorization and Getting a Token.to()
: Recipient. Takes an array like ['user_id', 1], where the first value corresponds to one of them: peer_id, user_id, domain, chat_id or user_ids.
For more information about parameters see messages.send.
Testing
Credits
- Evgeni Razumov
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-vk-notification-channel with dependencies
atehnix/vk-client Version ~1.0.0
illuminate/notifications Version ~5.3
illuminate/support Version ~5.1