<?php

namespace App\Listeners\Tickets;

use App\Events\tickets\SuperiorReplied;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;

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

    /**
     * Handle the event.
     *
     * @param  SuperiorReplied  $event
     * @return void
     */
    public function handle(SuperiorReplied $event)
    {
        return $event->ticket->user->notify(new \App\Notifications\Tickets\SuperiorReplied($event->ticket, $event->reply));
    }
}
