dimanche 10 octobre 2021

How to retrive multiple image from database which is seperated by , in laravel 8

Hey there i am new to laravel and i am working on a project where i saved multiple image in a single coloumn where image is seperated with a coloumn but i am unable to fetch images my data insert code is below

        $AllVehicleImage="";
        if($request->hasFile("VecImages"))
        {
            $files=$request->file("VecImages");
            foreach($files as $file)
            {
                $imageNameV=time().'_'.$file->getClientOriginalName();
                $request['VecImages']=$imageNameV;
                $file->move(\public_path("/assets/Resources/Images/DynamicImage/Products/") , $imageNameV);
                $AllVehicleImage.=$imageNameV.",";
            }
        }
        $VehicleSalsePost->image = $AllVehicleImage;
        $VehicleSalsePost->save();

this is how i am sending image to folder and saving it but i am unable to fetch image in my blade. this blade file is for admin control side file my blade file code looks like

@extends('Admin.Master.Layout.Sidebar')
@section('Content')
    
                                  <input type="file" id="RetrivedImage" class="form-control" id="exampleFormControlInput1" value="" required>
                              
        @endforeach
      

@endsection

The image file are to be fetched in dropzone

as i am new some explained code will be really apriceated. thank you



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire