<?php

namespace App\Http\Controllers;

use App\Models\Material;
use Illuminate\Http\Request;

class ImageController extends Controller
{

    public function index(Request $request)
    {
        $name = $request->name;
        $img  = Material::query()->where('title', $name)->first();

        return view('image', compact('img'));
    }
}
