mardi 28 février 2017

how i display image when i uplaod it using this code in laravel 5.1

I store imagepath in database like this http://localhost/shopping/public/src/img/46.png

my code :
     $imageName = $product->id . '.' . 
            $request->file('image')->getClientOriginalExtension();
            $request->file('image')->move(public_path('src/img/'.$imageName));
            $product->imagePath=$imagepath;
            $product->save();



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire