Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
vendor
composer.phar
.DS_Store
composer.lock
composer.lock
phpunit.xml
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,13 @@ You may use the NotifiableInterface and NotifiableTrait on any of your models:
{
return $this->email;
}

// By default only 'mail' channel is used
public function viaChannels()
{
return ['mail', 'database', ];
}

}
```

Expand Down
8 changes: 7 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,14 @@
"yiisoft/yii2-httpclient": "^2.0"
},
"require-dev": {
"phpunit/phpunit": "*"
"phpunit/phpunit": "^5.0"
},
"repositories": [
{
"type": "composer",
"url": "https://asset-packagist.org"
}
],
"autoload": {
"psr-4": {
"tuyakhov\\notifications\\": "src/",
Expand Down
5 changes: 5 additions & 0 deletions src/models/Notification.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@
class Notification extends ActiveRecord
{

public static function tableName()
{
return 'notification';
}

/**
* @inheritdoc
*/
Expand Down