<?php

namespace LaraBB\Group\Actions\Admin;

use Illuminate\Database\Eloquent\Collection;
use LaraBB\Group\Tasks\FindTask as FindGroupTask;

/**
 * Class OverviewAction
 * @package LaraBB\Group\Actions\Admin
 */
class OverviewAction
{
    /**
     * OverviewAction constructor.
     * @param FindGroupTask $getGroupTask
     */
    public function __construct(private readonly FindGroupTask $getGroupTask)
    {

    }


    /**
     * @return array|Collection
     */
    public function run(): Collection|array
    {
        return $this->getGroupTask->all();
    }
}
