<?php
require_once __DIR__ . '/../functions.php';

class Slider {
    private $conn;

    public function __construct($conn) {
        $this->conn = $conn;
    }

    public function getAll() {
        $stmt = $this->conn->query("SELECT * FROM sliders");
        return $stmt->fetchAll(PDO::FETCH_ASSOC);
    }
    public function get($id) {
        $stmt = $this->conn->query("SELECT * FROM sliders where id=$id");
        return $stmt->fetchAll(PDO::FETCH_ASSOC);
    }

  
}
?>