Slide 118
Slide 118 text
LEVERAGING LARAVEL @STAUFFERMATT
public function commentNeedsNotification($comment)
{
return NotifiedComment::where('github_id', $comment['id'])
->where('updated_at', $comment['updated_at'])
->count() == 0;
}
public function notifyComment($comment, $gist, $user)
{
Queue::push(NotifyUserOfNewGistComment::class, [
'user' => $user,
'comment' => $comment,
'gist' => $gist
]);
}