<?php
include_once('../../includes/db.php');

// Updated SQL query to include 'image' column
$categories = fetchAll("SELECT id, name, image FROM categories ORDER BY id DESC");

// Return the response with image data
echo json_encode([
  "status" => true,
  "data" => $categories
]);
?>
