0
I have a form
what makes uploads
of images , when I upload , the path is saved in the database by the field path
, I recover from the bench this image and play in a array
image
this.image = data;
now how can I display this image in a HTML
using the
image.path
??
<img src="{{ image.path }}">
I tried that and it didn’t work
Code of my image controller
$filename = $file->store("uploads/{$idCampaign}/images");
if (!$agency) { throw new NotFoundHttpException('agency_not_found'); }
if ($filename) {
$image->file_extension = $file->getClientOriginalExtension();
$image->filename = $file->getClientOriginalName();
$image->path = $filename;
$result = $this->service->save($image);
$img = new ImageCampaign();
$img->setCampaign($campaign);
$img->setImage($image);
$img->setAgency($agency);
$img->fill($request->post());
$this->imageCampaignService->save($img);
DB::commit();
return response()->json($result);
this code inserts the image in the bank
if you can put all the code used?
– novic