Add inactive subscribers notice

[MAILPOET-2088]
This commit is contained in:
Jan Jakeš
2019-05-31 15:20:59 +02:00
committed by M. Shull
parent 9ecd712fba
commit 0bb18b62b2
3 changed files with 71 additions and 0 deletions

View File

@ -601,6 +601,12 @@ class Subscriber extends Model {
->count();
}
static function getInactiveSubscribersCount() {
return self::where('status', self::STATUS_INACTIVE)
->whereNull('deleted_at')
->count();
}
static function bulkTrash($orm) {
$count = parent::bulkAction($orm, function($subscriber_ids) {
Subscriber::rawExecute(join(' ', [