JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr{ gilour

File "DeleteLinkOverlays.php"

Full Path: /home/markqprx/iniasli.pro/app-20260222054312/Actions/Overlay/DeleteLinkOverlays.php
File size: 545 bytes
MIME-type: text/x-php
Charset: utf-8

<?php

namespace App\Actions\Overlay;

use App\Models\Link;
use App\Models\LinkOverlay;
use Illuminate\Support\Collection;

class DeleteLinkOverlays
{
    /**
     * @param Collection|array $overlayIds
     */
    public function execute($overlayIds)
    {
        LinkOverlay::whereIn('id', $overlayIds)->delete();

        // set links to which this overlay is attached to "direct" type
        Link::whereIn('type_id', $overlayIds)
            ->where('type', 'overlay')
            ->update(['type_id' => null, 'type' => 'direct']);
    }
}