<?php

namespace App\Http\Controllers\API;

use App\Http\Controllers\Controller;
use App\Services\Admin\YeWu\HealthCheckupService;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Storage;

class UpLoadController extends Controller
{
    public function UpFile(){
        $file=request('file');

        if ($file->isValid()) {
//            $s=app()->make(HealthCheckupService::class);
//            $save=$s->SaveFile(['file'=>$file]);
            $date = date("Ymd");
            $save = $file->store('public/'.$date);
            return \Yz::Return(true,'上传成功',Storage::url($save));




        }else{
            return \Yz::echoError1('获取文件失败');
        }
    }
}
