<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class ImageController extends Controller
{
    public function index()
    {
    shell_exec('python3 imgs.py');

    // Get the list of image files in the public/images directory
    $images = array_diff(scandir(public_path('images')), ['.', '..']);

    // Pass the list of images to the view
    return view('images', compact('images'));
    }
}
