<?php

namespace App\Domains\File\Listeners;

use App\Events\FileUploadEvent;
use App\Domains\File\Services\FileService;

class FileUploadListener
{
    /**
     * Handle the event.
     *
     * @param  FileUploadEvent  $event
     * @return void
     */
    public function handle(FileUploadEvent $event)
    {
        app(FileService::class)->upload($event->file, $event->input, $event->disk);
    }
}
