####Like this image is going in DB ["image1","image2","image3"] but I want like this image1,image2,image3
###here is my controller code images are going in folder
..if($request->hasFile('image')){ .....$file = $request->file('image'); ......foreach($file as $files){ ......$name = $files->getClientOriginalName(); ......#imagelist[] = $name; ......$sell->image = json_encode($imagelist); .....} .....$sell->save(); ...} ..}
This please help...
If you just want a string, then replace
$sell->image = json_encode($imagelist);
with
$sell->image = implode(',', $imagelist);
woww thanx man it's working need one another help I want to fetch 1 image to show on home page after that i want to fetch all images in my gallery please suggest..
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community