<?php

namespace App\Http\Controllers;

use App\Service\ImageService;

class ImageController extends Controller
{
    //

    public function upload()
    {
        // 获取post的image参数
        $image = request()->file('image');
        $pid = request()->post('pid');

//        return $image;
        return new ImageService()->processImage($image, $pid);
    }
}
