<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>image upload and preview Archives - scmGalaxy</title>
	<atom:link href="https://www.scmgalaxy.com/tutorials/tag/image-upload-and-preview/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.scmgalaxy.com/tutorials/tag/image-upload-and-preview/</link>
	<description>A Platform for Software Engineers</description>
	<lastBuildDate>Wed, 13 Apr 2022 16:33:34 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1</generator>
	<item>
		<title>Multi File upload with Image preview and checklist delete options</title>
		<link>https://www.scmgalaxy.com/tutorials/multi-file-upload-with-image-preview-and-checklist-delete-options/</link>
					<comments>https://www.scmgalaxy.com/tutorials/multi-file-upload-with-image-preview-and-checklist-delete-options/#respond</comments>
		
		<dc:creator><![CDATA[rajeshkumar]]></dc:creator>
		<pubDate>Sat, 19 Jun 2021 06:06:43 +0000</pubDate>
				<category><![CDATA[Laravel]]></category>
		<category><![CDATA[Websites]]></category>
		<category><![CDATA[crud operation in laravel]]></category>
		<category><![CDATA[image upload and preview]]></category>
		<category><![CDATA[imageupload]]></category>
		<category><![CDATA[laravel]]></category>
		<guid isPermaLink="false">https://www.scmgalaxy.com/tutorials/?p=6535</guid>

					<description><![CDATA[<p>In this tutorial i’m going to describe how to upload multiple image with crud operation edit, update delete in laravel. [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/multi-file-upload-with-image-preview-and-checklist-delete-options/">Multi File upload with Image preview and checklist delete options</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-image"><img decoding="async" src="https://miro.medium.com/max/600/1*nrL53tHUFEEZEzBMucOohQ.jpeg" alt=""/></figure>



<p class="wp-block-paragraph" id="42ab">In this tutorial i’m going to describe how to upload multiple image with crud operation edit, update delete in laravel. Image upload is necessary of every project. In this project i’m going to learn how to upload with validation like images, mimes, max file upload and etc, with image preview when uploading image and adding features checklist delete.</p>



<p class="wp-block-paragraph" id="091a">So let’s go to download project and configure</p>



<p class="wp-block-paragraph" id="9e9e">Please follow some easy steps define below.</p>



<h1 class="wp-block-heading" id="9d03">First let’s go to install laravel project</h1>



<pre class="wp-block-preformatted">composer create-project laravel/laravel admin-dashboard "5.8.*"</pre>



<p class="wp-block-paragraph" id="7131">After Installation setup database So go to the&nbsp;<strong>.env&nbsp;</strong>file and add the database credentials.&nbsp;<em>lets go to&nbsp;</em><strong><em>.env folder</em></strong><em>&nbsp;and put database name and connect to database.</em></p>



<pre class="wp-block-preformatted">DB_CONNECTION=mysql<br>DB_HOST=127.0.0.1<br>DB_PORT=3306<br>DB_DATABASE=admin-dashboard<br>DB_USERNAME=root<br>DB_PASSWORD=</pre>



<figure class="wp-block-image"><img decoding="async" src="https://miro.medium.com/max/1043/0*jHgSQWVvf6c20U7h.png" alt=""/></figure>



<h1 class="wp-block-heading" id="b6e5">Now migrate the table</h1>



<pre class="wp-block-preformatted">php artisan migrate</pre>



<p class="wp-block-paragraph" id="deb8">Next step: Add Resource Route Go to your route and paste below code <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f447.png" alt="👇" class="wp-smiley" style="height: 1em; max-height: 1em;" /><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f447.png" alt="👇" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>



<pre class="wp-block-preformatted">use App\Http\Controllers\ProductController;<br>Route::resource('products', ProductController::class);</pre>



<p class="wp-block-paragraph" id="84fc">Now lets go to create controller, model and migration file go to your terminal and paste below code</p>



<pre class="wp-block-preformatted">php artisan make:model ProductController -mcr</pre>



<p class="wp-block-paragraph" id="f3d4">Lets go to your migration file productstable and paste below code. <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f447.png" alt="👇" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>



<pre class="wp-block-preformatted">&lt;?phpuse Illuminate\Support\Facades\Schema;<br>use Illuminate\Database\Schema\Blueprint;<br>use Illuminate\Database\Migrations\Migration;class CreateProductsTable extends Migration<br>{<br>    /**<br>     * Run the migrations.<br>     *<br>     * @return void<br>     */<br>    public function up()<br>    {<br>        Schema::create('products', function (Blueprint $table) {<br>            $table-&gt;bigIncrements('id');<br>            $table-&gt;string('name');<br>            $table-&gt;string('detail');<br>            $table-&gt;string('image');<br>            $table-&gt;timestamps();<br>        });<br>    }    /**<br>     * Reverse the migrations.<br>     *<br>     * @return void<br>     */<br>    public function down()<br>    {<br>        Schema::dropIfExists('products');<br>    }<br>}</pre>



<p class="wp-block-paragraph" id="9b30">Now migrate the table <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f447.png" alt="👇" class="wp-smiley" style="height: 1em; max-height: 1em;" /><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f447.png" alt="👇" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>



<pre class="wp-block-preformatted">php artisan migrate</pre>



<p class="wp-block-paragraph" id="0e59">Next go to Your ProductController file and paste below code <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f447.png" alt="👇" class="wp-smiley" style="height: 1em; max-height: 1em;" /><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f447.png" alt="👇" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>



<pre class="wp-block-preformatted">&lt;?php<br>  <br>namespace App\Http\Controllers;<br>  <br>use App\Product;<br>use Illuminate\Http\Request;<br>  <br>class ProductController extends Controller<br>{<br>    /**<br>     * Display a listing of the resource.<br>     *<br>     * @return \Illuminate\Http\Response<br>     */<br>    public function index()<br>    {<br>        $products = Product::latest()-&gt;paginate(5);<br>    <br>        return view('products.index',compact('products'))<br>            -&gt;with('i', (request()-&gt;input('page', 1) - 1) * 5);<br>    }<br>   <br>    /**<br>     * Show the form for creating a new resource.<br>     *<br>     * @return \Illuminate\Http\Response<br>     */<br>    public function create()<br>    {<br>        return view('products.create');<br>    }<br>    <br>    /**<br>     * Store a newly created resource in storage.<br>     *<br>     * @param  \Illuminate\Http\Request  $request<br>     * @return \Illuminate\Http\Response<br>     */<br>    public function store(Request $request)<br>    {<br>        $request-&gt;validate([<br>            'name' =&gt; 'required',<br>            'name' =&gt; 'required',<br>            'detail' =&gt; 'required',<br>            'image' =&gt; 'required|image|mimes:jpeg,png,jpg,gif,svg|max:2048',<br>        ]);<br>  <br>        $input = $request-&gt;all();<br>  <br>        if ($image = $request-&gt;file('image')) {<br>            $destinationPath = 'image/';<br>            $profileImage = date('YmdHis') . "." . $image-&gt;getClientOriginalExtension();<br>            $image-&gt;move($destinationPath, $profileImage);<br>            $input['image'] = "$profileImage";<br>        }<br>    <br>        Product::create($input);<br>     <br>        return redirect()-&gt;route('products.index')<br>                        -&gt;with('success','Product created successfully.');<br>    }<br>     <br>    /**<br>     * Display the specified resource.<br>     *<br>     * @param  \App\Product  $product<br>     * @return \Illuminate\Http\Response<br>     */<br>    public function show(Product $product)<br>    {<br>        return view('products.show',compact('product'));<br>    }<br>     <br>    /**<br>     * Show the form for editing the specified resource.<br>     *<br>     * @param  \App\Product  $product<br>     * @return \Illuminate\Http\Response<br>     */<br>    public function edit(Product $product)<br>    {<br>        return view('products.edit',compact('product'));<br>    }<br>    <br>    /**<br>     * Update the specified resource in storage.<br>     *<br>     * @param  \Illuminate\Http\Request  $request<br>     * @param  \App\Product  $product<br>     * @return \Illuminate\Http\Response<br>     */<br>    public function update(Request $request, Product $product)<br>    {<br>        $request-&gt;validate([<br>            'name' =&gt; 'required',<br>            'detail' =&gt; 'required'<br>        ]);<br>  <br>        $input = $request-&gt;all();<br>  <br>        if ($image = $request-&gt;file('image')) {<br>            $destinationPath = 'image/';<br>            $profileImage = date('YmdHis') . "." . $image-&gt;getClientOriginalExtension();<br>            $image-&gt;move($destinationPath, $profileImage);<br>            $input['image'] = "$profileImage";<br>        }else{<br>            unset($input['image']);<br>        }<br>          <br>        $product-&gt;update($input);<br>    <br>        return redirect()-&gt;route('products.index')<br>                        -&gt;with('success','Product updated successfully');<br>    }<br>  <br>    /**<br>     * Remove the specified resource from storage.<br>     *<br>     * @param  \App\Product  $product<br>     * @return \Illuminate\Http\Response<br>     */<br>    public function destroy(Product $product)<br>    {<br>        $product-&gt;delete();<br>     <br>        return redirect()-&gt;route('products.index')<br>                        -&gt;with('success','Product deleted successfully');<br>    }<br><br>    <br>}</pre>



<p class="wp-block-paragraph" id="405e">Next go to your Model</p>



<p class="wp-block-paragraph" id="5704"><strong>app/Models/Product.php</strong></p>



<pre class="wp-block-preformatted">&lt;?php<br><br>namespace App;<br><br>use Illuminate\Database\Eloquent\Model;<br><br>class Product extends Model<br>{<br>    protected $fillable =[<br>        'name', 'detail', 'image'<br>    ];<br>}</pre>



<p class="wp-block-paragraph" id="f32a">Now create some file as define below.</p>



<p class="wp-block-paragraph" id="3d1c">Go to your resources/view folder and create following files inside the products folder as define below file like</p>



<pre class="wp-block-preformatted">1) layout.blade.php<br>2) index.blade.php<br>3) create.blade.php<br>4) edit.blade.php<br>5) show.blade.php</pre>



<figure class="wp-block-image"><img decoding="async" src="https://miro.medium.com/max/614/1*T0m2I_ps3jYIQpePv6WM-w.png" alt=""/></figure>



<p class="wp-block-paragraph" id="9a1a">Next go to resouce/view/products/layout file and paste below code</p>



<p class="wp-block-paragraph" id="edc6">Go to your app.blade.php file and paste below code</p>



<pre class="wp-block-preformatted">&lt;!DOCTYPE html&gt;<br>&lt;html&gt;<br>&lt;head&gt;<br>    &lt;title&gt;Multiple Image upload with crud by Laravel Amit&lt;/title&gt;<br>    &lt;link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha/css/bootstrap.css" rel="stylesheet"&gt;<br>&lt;/head&gt;<br>&lt;body&gt;<br>  <br>&lt;div class="container"&gt;<br>    @yield('content')<br>&lt;/div&gt;<br>   <br>&lt;/body&gt;<br>&lt;/html&gt;</pre>



<p class="wp-block-paragraph" id="c7f5">Next go to products/index.blade.php and paste below code</p>



<pre class="wp-block-preformatted">@extends('products.layout')
@section('content')
&lt;br&gt;&lt;br&gt;
&lt;div class="container" style="margin-right: -50px;"&gt;
   &lt;div class="row"&gt;
      &lt;div class="col-lg-12 margin-tb"&gt;
         &lt;div class="pull-left"&gt;
            &lt;h2&gt;Multiple Image upload with crud by Laravel Amit&lt;/h2&gt;
         &lt;/div&gt;
         &lt;div class="pull-right"&gt;
            &lt;a class="btn btn-success" href="{{ route('products.create') }}"&gt; Create New Product&lt;/a&gt;
         &lt;/div&gt;
      &lt;/div&gt;
   &lt;/div&gt;
   @if ($message = Session::get('success'))
   &lt;div class="alert alert-success"&gt;
      &lt;p&gt;{{ $message }}&lt;/p&gt;
   &lt;/div&gt;
   @endif
   &lt;table class="table table-bordered"&gt;
      &lt;tr&gt;
         &lt;th width="50px"&gt;&lt;input type="checkbox" id="master"&gt;&lt;/th&gt;
         &lt;th&gt;No&lt;/th&gt;
         &lt;th&gt;Image&lt;/th&gt;
         &lt;th&gt;Name&lt;/th&gt;
         &lt;th&gt;Email&lt;/th&gt;
         &lt;th&gt;Details&lt;/th&gt;
         &lt;th width="280px"&gt;Action&lt;/th&gt;
      &lt;/tr&gt;
      @foreach ($products as $product)
      &lt;tr&gt;
         &lt;td&gt;&lt;input type="checkbox" class="sub_chk" data-id="{{$product-&gt;id}}"&gt;&lt;/td&gt;
         &lt;td&gt;{{ ++$i }}&lt;/td&gt;
         &lt;td&gt;&lt;img src="/image/{{ $product-&gt;image }}" width="100px"&gt;&lt;/td&gt;
         &lt;td&gt;{{ $product-&gt;name }}&lt;/td&gt;
         &lt;td&gt;{{ $product-&gt;email }}&lt;/td&gt;
         &lt;td&gt;{{ $product-&gt;detail }}&lt;/td&gt;
         &lt;td&gt;
            &lt;form action="{{ route('products.destroy',$product-&gt;id) }}" method="POST"&gt;
               &lt;a class="btn btn-info" href="{{ route('products.show',$product-&gt;id) }}"&gt;Show&lt;/a&gt;
               &lt;a class="btn btn-primary" href="{{ route('products.edit',$product-&gt;id) }}"&gt;Edit&lt;/a&gt;
               @csrf
               @method('DELETE')
               &lt;button type="submit" class="btn btn-danger"&gt;Delete&lt;/button&gt;
            &lt;/form&gt;
         &lt;/td&gt;
      &lt;/tr&gt;
      @endforeach
   &lt;/table&gt;
   {!! $products-&gt;links() !!}
&lt;/div&gt;
@endsection</pre>



<pre class="wp-block-preformatted">Next create files inside the products folder <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f447.png" alt="👇" class="wp-smiley" style="height: 1em; max-height: 1em;" /><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f447.png" alt="👇" class="wp-smiley" style="height: 1em; max-height: 1em;" /></pre>



<pre class="wp-block-preformatted">create.blade.php</pre>



<p class="wp-block-paragraph" id="ff15">Go to create.blade.php file and paste below code</p>



<pre class="wp-block-preformatted">@extends('products.layout')<br>@section('content')<br><br>    &lt;div class="container" style="margin-right: -87px;"&gt;<br>&lt;div class="row"&gt;<br>    &lt;div class="col-lg-6"&gt;<br>        &lt;div class="pull-left"&gt;<br>            &lt;h2&gt;Add New Product&lt;/h2&gt;<br>        &lt;/div&gt;<br>        &lt;div class="pull-right"&gt;<br>            &lt;a class="btn btn-primary" href="{{ route('products.index') }}"&gt; Back&lt;/a&gt;<br>        &lt;/div&gt;<br>    &lt;/div&gt;<br>&lt;/div&gt;<br>     &lt;br&gt;&lt;br&gt;<br>@if ($errors-&gt;any())<br>    &lt;div class="alert alert-danger"&gt;<br>        &lt;strong&gt;Whoops!&lt;/strong&gt; There were some problems with your input.&lt;br&gt;&lt;br&gt;<br>        &lt;ul&gt;<br>            @foreach ($errors-&gt;all() as $error)<br>                &lt;li&gt;{{ $error }}&lt;/li&gt;<br>            @endforeach<br>        &lt;/ul&gt;<br>    &lt;/div&gt;<br>@endif<br>     <br>&lt;form action="{{ route('products.store') }}" method="POST" enctype="multipart/form-data"&gt;<br>    @csrf<br>    <br>     &lt;div class="row"&gt;<br>        <br>        &lt;div class="col-md-12"&gt;<br>                  &lt;div class="form-group"&gt;<br>                      &lt;input type="file" name="image" placeholder="Choose image" id="image"&gt;<br>                        @error('image')<br>                        &lt;div class="alert alert-danger mt-1 mb-1"&gt;{{ $message }}&lt;/div&gt;<br>                        @enderror<br>                  &lt;/div&gt;<br>              &lt;/div&gt;<br> <br>              &lt;!-- &lt;div class="col-md-12 mb-2"&gt;<br>                  &lt;img id="amit-image-before-upload" src="https://www.riobeauty.co.uk/images/product_image_not_found.gif"<br>                      alt="preview image" style="max-height: 250px;"&gt;<br>              &lt;/div&gt; --&gt;<br>        &lt;!-- preview code testing  --&gt;<br>        &lt;div class="col-md-12 mb-2"&gt;<br>                  &lt;img id="amit-image-before-upload" src="https://www.riobeauty.co.uk/images/product_image_not_found.gif"<br>                      alt="preview image" style="max-height: 250px;"&gt;<br>              &lt;/div&gt;<br>        &lt;!-- preview code test ending  --&gt;<br>        &lt;div class="col-lg-12 col-sm-6 col-md-6 text-center"&gt;<br>                &lt;button type="submit" class="btn btn-primary"&gt;Submit&lt;/button&gt;<br>        &lt;/div&gt;<br>    &lt;/div&gt;<br>     <br>&lt;/form&gt;<br>&lt;/div&gt;<br><br>&lt;script src="https://code.jquery.com/jquery-3.5.1.min.js"&gt;&lt;/script&gt;<br> <br>&lt;script type="text/javascript"&gt;<br>      <br>$(document).ready(function (e) {<br> <br>   <br>   $('#image').change(function(){<br>            <br>    let reader = new FileReader();<br> <br>    reader.onload = (e) =&gt; { <br> <br>      $('#amit-image-before-upload').attr('src', e.target.result); <br>    }<br> <br>    reader.readAsDataURL(this.files[0]); <br>   <br>   });<br>   <br>});<br> <br>&lt;/script&gt;<br><br><br>@endsection</pre>



<p class="wp-block-paragraph" id="a68b">Next create files inside the products folder <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f447.png" alt="👇" class="wp-smiley" style="height: 1em; max-height: 1em;" /><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f447.png" alt="👇" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>



<pre class="wp-block-preformatted">edit.blade.php</pre>



<p class="wp-block-paragraph" id="6543">Copy below code and paste edit.blade.php file</p>



<pre class="wp-block-preformatted">@extends('products.layout')<br>     <br>@section('content')<br>&lt;br&gt;&lt;br&gt;&lt;br&gt;<br>&lt;div class="container" style="margin-right: -87px;"&gt;<br>    &lt;div class="row"&gt;<br>        &lt;div class="col-lg-4 margin-tb"&gt;<br>            &lt;div class="pull-left"&gt;<br>                &lt;h2&gt;Edit Product&lt;/h2&gt;<br>            &lt;/div&gt;<br>            &lt;div class="pull-right"&gt;<br>                &lt;a class="btn btn-primary" href="{{ route('products.index') }}"&gt; Back&lt;/a&gt;<br>            &lt;/div&gt;<br>        &lt;/div&gt;<br>    &lt;/div&gt;<br>     <br>    @if ($errors-&gt;any())<br>        &lt;div class="alert alert-danger"&gt;<br>            &lt;strong&gt;Whoops!&lt;/strong&gt; There were some problems with your input.&lt;br&gt;&lt;br&gt;<br>            &lt;ul&gt;<br>                @foreach ($errors-&gt;all() as $error)<br>                    &lt;li&gt;{{ $error }}&lt;/li&gt;<br>                @endforeach<br>            &lt;/ul&gt;<br>        &lt;/div&gt;<br>    @endif<br>    <br>    &lt;form action="{{ route('products.update',$product-&gt;id) }}" method="POST" enctype="multipart/form-data"&gt; <br>        @csrf<br>        @method('PUT')<br>     <br>         &lt;div class="row"&gt;<br>         &lt;div class="col-lg-2 col-sm-2 col-md-2"&gt;<br>                &lt;div class="form-group"&gt;<br>                    &lt;strong&gt;Name:&lt;/strong&gt;<br>                    &lt;input type="text" name="name" value="{{ $product-&gt;name }}" class="form-control" placeholder="Name"&gt;<br>                &lt;/div&gt;<br>            &lt;/div&gt;<br>            &lt;div class="col-lg-6 col-sm-6 col-md-6"&gt;<br>                &lt;div class="form-group"&gt;<br>                    &lt;strong&gt;Email:&lt;/strong&gt;<br>                    &lt;input type="text" name="name" value="{{ $product-&gt;email }}" class="form-control" placeholder="email"&gt;<br>                &lt;/div&gt;<br>            &lt;/div&gt;<br>            &lt;br&gt;<br>            &lt;div class="col-lg-7 col-sm-6 col-md-6"&gt;<br>                &lt;div class="form-group"&gt;<br>                    &lt;strong&gt;Detail:&lt;/strong&gt;<br>                    &lt;textarea class="form-control" style="height:150px" name="detail" placeholder="Detail"&gt;{{ $product-&gt;detail }}&lt;/textarea&gt;<br>                &lt;/div&gt;<br>            &lt;/div&gt;<br>            &lt;div class="col-lg-4 col-sm-3 col-md-3"&gt;<br>                &lt;div class="form-group"&gt;<br>                    &lt;strong&gt;Image:&lt;/strong&gt;<br>                    &lt;input type="file" name="image" class="form-control" placeholder="image"&gt;<br>                    &lt;img src="/image/{{ $product-&gt;image }}" width="300px"&gt;<br>                &lt;/div&gt;<br>            &lt;/div&gt;<br>            &lt;div class="col-lg-4 col-sm-4 col-md-4 text-center"&gt;<br>              &lt;button type="submit" class="btn btn-primary"&gt;Submit&lt;/button&gt;<br>            &lt;/div&gt;<br>        &lt;/div&gt;<br>     <br>    &lt;/form&gt;<br>&lt;/div&gt;<br>@endsection</pre>



<p class="wp-block-paragraph" id="dea8">Next create files inside the products folder <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f447.png" alt="👇" class="wp-smiley" style="height: 1em; max-height: 1em;" /><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f447.png" alt="👇" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>



<pre class="wp-block-preformatted">show.blade.php</pre>



<p class="wp-block-paragraph" id="dcca">Copy below code and paste show.blade.php file <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f447.png" alt="👇" class="wp-smiley" style="height: 1em; max-height: 1em;" /><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f447.png" alt="👇" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>



<pre class="wp-block-preformatted">@extends('products.layout')<br>   <br>@section('content')<br>    &lt;div class="row"&gt;<br>        &lt;div class="col-lg-12 margin-tb"&gt;<br>            &lt;div class="pull-left"&gt;<br>                &lt;h2&gt; Show Product&lt;/h2&gt;<br>            &lt;/div&gt;<br>            &lt;div class="pull-right"&gt;<br>                &lt;a class="btn btn-primary" href="{{ route('products.index') }}"&gt; Back&lt;/a&gt;<br>            &lt;/div&gt;<br>        &lt;/div&gt;<br>    &lt;/div&gt;<br>     <br>    &lt;div class="row"&gt;<br>        &lt;div class="col-xs-12 col-sm-12 col-md-12"&gt;<br>            &lt;div class="form-group"&gt;<br>                &lt;strong&gt;Name:&lt;/strong&gt;<br>                {{ $product-&gt;name }}<br>            &lt;/div&gt;<br>        &lt;/div&gt;<br>        &lt;div class="col-xs-12 col-sm-12 col-md-12"&gt;<br>            &lt;div class="form-group"&gt;<br>                &lt;strong&gt;Email:&lt;/strong&gt;<br>                {{ $product-&gt;email }}<br>            &lt;/div&gt;<br>        &lt;/div&gt;<br>        &lt;div class="col-xs-12 col-sm-12 col-md-12"&gt;<br>            &lt;div class="form-group"&gt;<br>                &lt;strong&gt;Details:&lt;/strong&gt;<br>                {{ $product-&gt;detail }}<br>            &lt;/div&gt;<br>        &lt;/div&gt;<br>        &lt;div class="col-xs-12 col-sm-12 col-md-12"&gt;<br>            &lt;div class="form-group"&gt;<br>                &lt;strong&gt;Image:&lt;/strong&gt;<br>                &lt;img src="/image/{{ $product-&gt;image }}" width="500px"&gt;<br>            &lt;/div&gt;<br>        &lt;/div&gt;<br>    &lt;/div&gt;<br>@endsection</pre>



<p class="wp-block-paragraph" id="86e8">Now go to your terminal paste below code</p>



<pre class="wp-block-preformatted">php artisan serve</pre>



<figure class="wp-block-image"><img decoding="async" src="https://miro.medium.com/max/1360/1*8DiiorLR68N0GBauCywkeQ.png" alt=""/></figure>



<pre class="wp-block-preformatted"><a href="http://127.0.0.1:8000/products">http://127.0.0.1:8000/products</a></pre>



<p class="wp-block-paragraph" id="00b3">Now its showing like this</p>



<figure class="wp-block-image"><img decoding="async" src="https://miro.medium.com/max/1366/1*Y0Nl-E7en4gN6MhzCnIOYg.png" alt=""/></figure>



<p class="wp-block-paragraph" id="7d2b">Now you can see before submit the data image preview image showing fine</p>



<figure class="wp-block-image"><img decoding="async" src="https://miro.medium.com/max/818/1*UFitLteiCRcfO61cN1uAsQ.png" alt=""/></figure>



<p class="wp-block-paragraph" id="356a">These steps are implement on my own learning project and looks like this</p>



<figure class="wp-block-image"><img decoding="async" src="https://miro.medium.com/max/1353/1*Hixn8Fqcqjc-cbQ1E-iYCg.png" alt=""/></figure>



<p class="wp-block-paragraph" id="19fa">Thanks i hope its helpfull for you…. <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f64f.png" alt="🙏" class="wp-smiley" style="height: 1em; max-height: 1em;" /><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f64f.png" alt="🙏" class="wp-smiley" style="height: 1em; max-height: 1em;" /><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f64f.png" alt="🙏" class="wp-smiley" style="height: 1em; max-height: 1em;" /> if you have any questions comment below. <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f64b.png" alt="🙋" class="wp-smiley" style="height: 1em; max-height: 1em;" /><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f64b.png" alt="🙋" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/multi-file-upload-with-image-preview-and-checklist-delete-options/">Multi File upload with Image preview and checklist delete options</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/multi-file-upload-with-image-preview-and-checklist-delete-options/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
