title: Ajax image load after dropzone success event
body: <p>So I am using dropzone.js and I want to reload a particular image after the success event of dropzone.</p>
  
  <p>my controller</p>
  
  <pre><code>public function edit($id)
  {
      $offer = Offer::find($id);
  
      if(!is_object($offer-&gt;getMedia('featimgs')-&gt;first())){
          $offerfeatimg = '/assets/images/offerfeatimg.jpg';
      } else {
          $offerfeatimg = $offer-&gt;getMedia('featimgs')-&gt;first()-&gt;getUrl('medium');
      }
  
      return view('admin.offers.edit')-&gt;with(compact('offer', 'offerfeatimg'));
  }
  </code></pre>
  
  <p>so this is where I pass the image to the view:</p>
  
  <pre><code>&lt;div class="panel-body"&gt;
              &lt;img src="{{ $offerfeatimg }}" class="img-responsive"&gt;
              @if($offerfeatimg != '/assets/images/offerfeatimg.jpg')
              &lt;div class="removebutton"&gt;
                  &lt;a href="/admin/offer/featimg/delete/{{ $offer-&gt;id }}" class="btn btn-danger" role="button"&gt;Izbrisi sliku&lt;/a&gt;
              &lt;/div&gt;
              @endif
              &lt;form action="/admin/offer/featimg/{{ $offer-&gt;id }}" class="dropzone" id="my-awesome-dropzone"&gt;
                  {!! csrf_field() !!}
                  &lt;div class="dz-message"&gt;Prebacite glavnu sliku za ovu ponudu&lt;/div&gt;
              &lt;/form&gt;
  
          &lt;/div&gt;
  </code></pre>
  
  <p>the view:</p>
  
  <p>so I would want to reload this part via ajax after success dropzone event:</p>
  
  <pre><code>&lt;img src="{{ $offerfeatimg }}" class="img-responsive"&gt;
              @if($offerfeatimg != '/assets/images/offerfeatimg.jpg')
              &lt;div class="removebutton"&gt;
                  &lt;a href="/admin/offer/featimg/delete/{{ $offer-&gt;id }}" class="btn btn-danger" role="button"&gt;Izbrisi sliku&lt;/a&gt;
              &lt;/div&gt;
              @endif
  </code></pre>
  
  <p>Any ideas ?</p>