<?php
require '../../app/db.php';
require '../includes/auth.php';

header('Content-Type: application/json');

$stmt = $pdo->query("
SELECT id, full_name, phone,
current_lat, current_lng
FROM drivers
WHERE status='online'
AND current_lat IS NOT NULL
");

echo json_encode([
    'drivers' => $stmt->fetchAll(PDO::FETCH_ASSOC)
]);
