skip to Main Content

Undefined variable: image while update in laravel

public function update_room_detail(Request $request) { $request->validate([ 'room_type' => 'required', ]); if($images = $request->file('room_image')) { foreach($images as $item): $var = date_create(); $time = date_format($var, 'YmdHis'); $imageName = $time.'-'.$item->getClientOriginalName(); $item->move(public_path().'/assets/images/room', $imageName); $arr[] = $imageName; endforeach; $image = implode("|", $arr); } else {…

VIEW QUESTION
Back To Top
Search