title: Instant Search with keyup vuejs and laravel
body: <p>I tried to build an instant search using vuejs and laravel 5.3 but somehow It wont work with no errors showing  </p>
  
  <p>Controller (fullcode <a href="https://pastebin.com/6mQ4eWTf" rel="nofollow noreferrer">https://pastebin.com/6mQ4eWTf</a>) :   </p>
  
  <pre><code>public function index(Request $request) {
          $search = $request-&gt;search;
          $items = Staff::where('nama', 'LIKE', '%'.$search.'%')-&gt;paginate(5);
          $response = [
              'pagination' =&gt; [
                  'total'        =&gt; $items-&gt;total(),
                  'per_page'     =&gt; $items-&gt;perPage(),
                  'current_page' =&gt; $items-&gt;currentPage(),
                  'last_page'    =&gt; $items-&gt;lastPage(),
                  'from'         =&gt; $items-&gt;firstItem(),
                  'to'           =&gt; $items-&gt;lastItem()
              ],
              'data'       =&gt; $items
          ];  
  </code></pre>
  
  <p>staff.js method (fullcode <a href="https://pastebin.com/NDxzqsyp" rel="nofollow noreferrer">https://pastebin.com/NDxzqsyp</a>) :</p>
  
  <pre><code>methods: {
          getVueItems: function (page) {
              this.$http.get('/staffitems?page=' + page + '&amp;search=' + this.search).then((response) =&gt; {
                  this.$set('items', response.data.data.data);
                  this.$set('pagination', response.data.pagination);
              });
              setTimeout(this.getVueItems, 5000);
          },
  </code></pre>
  
  <p>Blade (fullcode <a href="https://pastebin.com/6uDZRryE" rel="nofollow noreferrer">https://pastebin.com/6uDZRryE</a>) :</p>
  
  <pre><code>&lt;input v-on:keyup.enter="getVueItems" type="text" class="form-control" name="search" placeholder="Cari..." v-model="search"/&gt;  
  </code></pre>
  
  <p>Routes :</p>
  
  <pre><code>Route::get('/staffcrud', 'StaffController@Crud');
  Route::resource('/staffitems', 'StaffController');
  </code></pre>
  
  <p>The data correctly shown (tested by getting json response from /staffitems?page=1&amp;search=jon with or without search value), but somehow when I do type words to search in input search column, nothing happened as soon as i finished typing, probably event handling in blade are wrong or my method in staff.js any solution for this?</p>