更新时间:2023-11-17 12:00:22
确保 public / img / products
文件夹存在并且它是可写的,并且如果需要也尝试使用绝对路径,如下所示:
Make sure the public/img/products
folder exists and it's writable and also try to use absolute path if necessary, like this:
$filename = time() . '.' . $image->getClientOriginalExtension();
$path = public_path('img/products/' . $filename);
Image::make($image->getRealPath())->resize(468, 249)->save($path);