bakalarska_praca/app/Http/Controllers/ImageController.php

20 lines
418 B
PHP
Raw Permalink Normal View History

2023-05-11 19:57:12 +00:00
<?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'));
}
}