<?php
// Load Laravel
require __DIR__ . '/../vendor/autoload.php';
$app = require_once __DIR__ . '/../bootstrap/app.php';
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
$response = $kernel->handle(
    $request = Illuminate\Http\Request::capture()
);

// DB Query
$tourId = 1;
$result = Illuminate\Support\Facades\DB::table('tours')->where('id', $tourId)->select('pickup_points')->first();

header('Content-Type: text/plain');
if ($result) {
    echo "Raw DB Content for Tour #$tourId:\n";
    echo $result->pickup_points . "\n\n";
    
    echo "Decoded:\n";
    print_r(json_decode($result->pickup_points, true));
} else {
    echo "Tour #$tourId not found.";
}
