<?php
namespace App\Services\File;

class FileService
{
    public static function uploadImage($image)
    {
        $newFileName = rand(10000,99999).time().'.'.$image->getClientOriginalName();
        $destinationPath = public_path('/storage/files');
        $image->move($destinationPath, $newFileName);

        return '/storage/files/'.$newFileName;
    }
}
