title: Captcha refresh (mewebstudio)
body: <p><strong>Purpose :</strong> to refresh the captcha image.</p>
  
  <p><strong>routes.php</strong></p>
  
  <pre><code>Route::get('/get_captcha/{config?}', function (\Mews\Captcha\Captcha $captcha, $config = 'default') {
      return $captcha-&gt;src($config);
  });
  </code></pre>
  
  <p><strong>captcha image (mypage.blade.php):</strong></p>
  
  <pre><code>&lt;img src="{{ Captcha::img() }}" alt="captcha" class="captcha-img" data-refresh-config="default"&gt;
  </code></pre>
  
  <p><strong>js file:</strong></p>
  
  <pre><code>$(document).ready(function(){
      $('img.captcha-img').on('click', function () {
          var captcha = $(this);
          var config = captcha.data('refresh-config');
          //console.log(config);
          $.ajax({
              method: 'GET',
              url: '/get_captcha/' + config,
          }).done(function (response) {
              captcha.prop('src', response);
          });
      });
  });
  </code></pre>
  
  <p><strong>Issue :</strong>  js ajax error on my console : <code>http://localhost/get_captcha/default 404</code> error.</p>
  
  <p>reference : <a href="https://github.com/mewebstudio/captcha/issues/54#issuecomment-141483501" rel="nofollow">https://github.com/mewebstudio/captcha/issues/54#issuecomment-141483501</a></p>
  
  <p><strong>Additional information :</strong> I'm using captcha for Laravel 4, and i wasn't able to find a method called <code>src</code>, in the line above <code>$captcha-&gt;src($config)</code></p>
  
  <p>Thank you in advance.</p>