<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Intervention\Image\Facades\Image;


class ImageUploadController extends Controller
{
    public static function  uploadImage($name, $path, $file): string
    {
        $image_file_name = $name . '.webp';
        Image::make($file)->save(public_path($path). $image_file_name, 50, 'webp');
        return $image_file_name;
    }

}
