Ahmed Alsalih نشر 21 يناير أرسل تقرير مشاركة نشر 21 يناير laravel saves my edited from the form images as tmp files, didn't find any up to date online slutions, can you help me? notes: the images are being stored currectly, it's just that they don't show when called in html files, and they're considered tmp in phpmyadmin here is my controller public function update(Request $request, Post $post) { $data = $request->validate([ 'description' => 'required', 'image' => ['nullable', 'mimes:png,jpg,jpeg'] ]); if($request->has('image')){ $image = $request['image']->store('posts','public'); $date['image'] = $image; } $post->update($data); return redirect('/p/' . $post->slug); } 1 اقتباس رابط هذا التعليق شارك على الشبكات الإجتماعية More sharing options...
0 Khaled Osama3 نشر 21 يناير أرسل تقرير مشاركة نشر 21 يناير تبدو المشكلة هنا خطأ إملائي في الكود. يجب تغيير السطر: $date['image'] = $image; إلى: $data['image'] = $image; بعد إجراء هذا التغيير، يجب أن يتم تخزين الصورة بشكل صحيح اقتباس رابط هذا التعليق شارك على الشبكات الإجتماعية More sharing options...
السؤال
Ahmed Alsalih
laravel saves my edited from the form images as tmp files, didn't find any up to date online slutions, can you help me?
notes: the images are being stored currectly, it's just that they don't show when called in html files, and they're considered tmp in phpmyadmin
here is my controller
رابط هذا التعليق
شارك على الشبكات الإجتماعية
1 جواب على هذا السؤال
Recommended Posts
انضم إلى النقاش
يمكنك أن تنشر الآن وتسجل لاحقًا. إذا كان لديك حساب، فسجل الدخول الآن لتنشر باسم حسابك.