dev-master
9999999-devNotification for Yii2
BSD-4-Clause
The Requires
by forecho
extension yii2 notification
dev-add-license-1
dev-add-license-1Notification for Yii2
BSD-4-Clause
The Requires
by forecho
extension yii2 notification
Notification for Yii2
Notification for Yii2, (*1)
The preferred way to install this extension is through composer., (*3)
Either run, (*4)
php composer.phar require --prefer-dist yiier/yii2-notification "*"
or add, (*5)
"yiier/yii2-notification": "*"
to the require section of your composer.json
file., (*6)
Run the following command, (*7)
$ php yii migrate --migrationPath=@yiier/notification/migrations/
Config, (*8)
Configure Controller class as follows : :, (*9)
<?php use yiier\notification\actions\NotificationAction; class NotificationController extends Controller { public function actions() { return [ 'do' => [ 'class' => NotificationAction::className(), ] ]; } }
Url, (*10)
POST: http://xxxxxxxxxxxxxx/notification/do Form Data: action=read_all POST: http://xxxxxxxxxxxxxx/notification/do Form Data: action=read_all&ids=1,2,3 POST: http://xxxxxxxxxxxxxx/notification/do Form Data: action=delete_all POST: http://xxxxxxxxxxxxxx/notification/do Form Data: action=delete_all&ids=1,2,3 POST: http://xxxxxxxxxxxxxx/notification/do Form Data: action=delete&id=1
action=delete
you can use action=Notification::DEL_ACTION
, (*11)
http response success(code==200) return json:, (*12)
{"code":200,"data":0,"message":"success"}
http response failure(code==500) return json:, (*13)
{"code":500,"data":"","message":"xxxx"}
More Notification, (*14)
Notification for Yii2
BSD-4-Clause
extension yii2 notification
Notification for Yii2
BSD-4-Clause
extension yii2 notification