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

File "LoadChannelMenuItems.php"

Full Path: /home/markqprx/iniasli.pro/common-20260222054425/Channels/LoadChannelMenuItems.php
File size: 598 bytes
MIME-type: text/x-php
Charset: utf-8

<?php

namespace Common\Channels;

use App\Models\Channel;
use Illuminate\Support\Collection;

class LoadChannelMenuItems
{
    public function execute(): Collection
    {
        return Channel::limit(20)
            ->where('type', 'channel')
            ->get()
            ->map(
                fn(Channel $channel) => [
                    'label' => $channel->name,
                    'action' => '/' . $channel->slug,
                    'type' => 'route',
                    'model_id' => $channel->id,
                    'id' => $channel->id,
                ],
            );
    }
}