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);
}