<?php

namespace App\Listeners;

use App\Events\FeedRemoveProcessed;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;

class RemoveFeedUsers implements ShouldQueue
{
    /**
     * Create the event listener.
     *
     * @return void
     */
    public function __construct()
    {
        //
    }

    /**
     * Handle the event.
     *
     * @param  FeedRemoveProcessed  $event
     * @return void
     */
    public function handle(FeedRemoveProcessed $event)
    {
        \DB::table('users_live_feeds')->where('feed_id', $event->feed->id)->delete();
    }
}
