hadis
4 months ago
531
2
Laravel

image update problem

Posted 4 months ago by hadis

When I edit and update a data the image change to xxx.temp instead of xxx.png or jpg

 public function update(Request $request,$id)
    {
        $data = Singleproduct::find($id);
        $data->name = $request->name;
        $data->explain = $request->explain;
        $data->price = $request->price;
        $data->parent_name = $request->parent_name;
        $data->image = $request->image;

        $data->save();

        return redirect(route('product.index'));
    }

what is the problem?

Please sign in or create an account to participate in this conversation.