<?php if($request->hasFile('image')){ $image = $request->file('image'); $image_name = $image->getClientOriginalName(); $image->move(public_path('/images'),$image_name); $image_path = "/images/" . $image_name; } ?>