Global subscribers and fix notifications

This commit is contained in:
Joseph Cohen
2016-04-30 02:25:05 -05:00
committed by Graham Campbell
parent 5abd25c408
commit 05bb91d2d9
19 changed files with 477 additions and 147 deletions
+4 -1
View File
@@ -107,7 +107,10 @@ class Subscription extends Model
{
return $query->select('subscriptions.*')
->join('subscribers', 'subscriptions.subscriber_id', '=', 'subscribers.id')
->where('component_id', $component_id)
->where(function ($query) {
$query->where('subscriptions.component_id', $component_id)
->orWhere('subscribers.global');
})
->whereNotNull('subscribers.verified_at');
}
}