0
私は検索してこの問題の答えを見つけられませんでした。Intervention画像ソースが更新時に読み込めない
まあ、私は写真をアップロードするためにlaravel 5.5での介入を使用しています。 新しいレシピ(私の場合)がcreate
になると、すべて動作し、写真が順調にアップロードされています。
これは最初のアップロードのためのコードです:すべての標準的なもの
$front_image = $request->file('front_image');
$frontImageName = md5(time()) . '.' . $front_image
->getClientOriginalExtension();
$locationfi = public_path('photos/front/' . $frontImageName);
Image::make($front_image)
->resize(454,340)
->insert(public_path('photos/logo.png'),'bottom-right')
->save($locationfi);
$recipe->front = $frontImageName;
。 しかし、私がedit
レシピしようとすると、私はImage source not readable
を取得します。 これは、再アップロードのためのコードです:私は両方の形式でenctype="multipart/form-data"
を使用
$front_image = $request->file('front_image');
$frontImageName = md5(time()).'.'.$front_image
->getClientOriginalExtension();
$location = public_path('photos/front/'.$frontImageName);
Image::make($front_image)->resize(690,517)
->insert(public_path('photos/tk.png'),'bottom-right')
->save($location);
//update the database
$recipe->front=$imageName;
、のための作成および更新。 更新フォームiでも{{method_field('PUT'}}
を使用してください。
ここには何が欠けていますか?ありがとう。
どのバージョンのPHPをお使いですか? –
私はPHPを使用しています7 @sunitiyadav – GabMic