<?php

namespace App\Listeners;

use App\Jobs\UpdateVehicleSearchContent;
use Illuminate\Foundation\Bus\DispatchesJobs;

class TriggerVehicleSearchContentUpdate
{
    use DispatchesJobs;

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

    /**
     * Handle the event.
     *
     * @param  object  $event
     * @return void
     */
    public function handle($event)
    {
        $this->dispatch(new UpdateVehicleSearchContent($event->provider ?? ''));
    }
}
