title: Can't auto-generate slug realtime in Laravel 5.4
body: <p>I want to auto-generate slug when user input the title.</p>
  
  <pre><code>&lt;div class="form-group"&gt;
      &lt;label for="name"&gt;Title of News&lt;/label&gt;
      &lt;input type="text" class="form-control" id="name" name="name"
              placeholder="Enter your title of news"
              value="@if(isset($news-&gt;name)){{ old('name', $news-&gt;name) }}@else{{old('name')}}@endif"&gt;
  &lt;/div&gt;
  
  &lt;div class="form-group"&gt;
      &lt;label for="slug"&gt;Slug&lt;/label&gt;
      &lt;input type="text" class="form-control" id="slug" name="slug"
          placeholder="slug"
          {{!! isFieldSlugAutoGenerator($dataType, $dataTypeContent, "slug") !!}}
          value="@if(isset($news-&gt;name)){{ str_slug($news-&gt;name, '-') }}@endif"&gt;
  &lt;/div&gt;
  
  &lt;script&gt;
      $('document').ready(function () {
  
          $('#slug').slugify();
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>Problem is:</p>
  
  <ol>
  <li><p>It does not change real time when I enter text in <code>Title of news</code>.</p></li>
  <li><p>Because it does not change real time, it doesn't save slug correctly.</p></li>
  </ol>
  
  <p>Example:</p>
  
  <p>When I input in fields <code>Title</code> of news: <code>Apple iPhone 7</code> -> click button Save. The fields <code>slug</code> not contain any values.</p>
  
  <p>Next, I change <code>Title</code> of news to <code>Apple have plan release IOS 11</code> -> click button Save. The fields <code>slug</code> in database change to <code>Apple iPhone 7</code>.</p>
  
  <p>You can see at gif:</p>
  
  <p><a href="https://i.imgur.com/JD0TbG8.gif" rel="nofollow noreferrer">http://i.imgur.com/JD0TbG8.gif</a></p>