<?php

namespace App\Domains\File\Listeners;

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

class FileDetachListener
{
    /**
     * Handle the event.
     *
     * @param  FileDetachEvent  $event
     * @return void
     */
    public function handle(FileDetachEvent $event)
    {
        app(FileService::class)->detach($event->type, $event->typeid);
    }
}
