Files

29 lines
651 B
PHP

<?php
namespace App\Services\Api\Service;
use App\Repositories\Api\Service\ServiceRepositoryInterface;
class ServiceService
{
protected $serviceRepository;
public function __construct(ServiceRepositoryInterface $serviceRepository)
{
$this->serviceRepository = $serviceRepository;
}
/**
* Lấy danh sách dịch vụ đang hoạt động
*/
public function getActiveServices(int $limit = 10)
{
return $this->serviceRepository->getActiveServices($limit);
}
public function findActiveBySlug(string $slug)
{
return $this->serviceRepository->findActiveBySlug($slug);
}
}