<?php

namespace App\Actions\V1\List;

use App\Models\Service;

class ServiceListAction
{
   public function execute(?int $limit = null)
    {
        $query = Service::orderBy('id', 'desc');

        if ($limit) {
            $query->limit($limit);
        }

        return $query->get();
    }
}