<?php

namespace App\Modules\Testimonials\Repositories;

use Core\Database\DB;
use PDO;

class TestimonialsRepository
{
    public function active(): array
    {
        $stmt = DB::conn()->query("
            SELECT *
            FROM testimonials
            WHERE status = 'active'
            ORDER BY id DESC
            LIMIT 4
        ");

        return $stmt->fetchAll(PDO::FETCH_ASSOC);
    }
}