Question: In my `ClientController@index`, I have a form with a select input to list every client in the database.

After submitting the form to list detailed client information, the `URL` is like `/clients?client_id=id`.

The routes are the defult with `route::resource()`.

```
<form name="show_client" id="show_client">
      <div class="form-group">
          <label for="branch"><b>Selectione o Cliente</b></label>
          <select class="form-control select2" name="client_id" id="client_id" required>
              <option value="">Selecione o Cliente</option>
              @foreach ($list as $client)
                  <option value="{{ $client->client_id }}">{{ $client->name }} </option>
              @endforeach
           </select>
      </div>
      <hr />
      <div class="form-group">
          <button type="submit" class="btn btn-primary btn-rounded">Listar Cliente</button>
      </div>
</form>

```

```
<script>
          $(function() {
           $('#show_client').submit(function(){
             var client_id = $('#client_id').val();
             $(this).attr('action', "/clients/" + client_id);
           });
          });
</script>

```

Is there any way to work the url to be /clients/id?

I accomplish that by using an js function but it's clearly not the solution.

Answer: 
Assuming `search` is in your `methods` it should not be using an arrow function as that will give you the wrong `this` binding.

Instead use:

```js
methods: {
  search: throttle(function (live) {
     // ...
  }, 500)
}

```

Here I'm also assuming that `throttle` will preserve the `this` value, which would be typical for implementations of throttling.
Like I said in my comment, I suspect this is a scoping issue.
Perhaps if you return the throttle function with the Vue component passed in, you might see better results:

```
search: function() {
let vm = this;

return throttle(live => {
      console.log("entered!!!");
      console.log("this", this);
      console.log("vm", vm);

      if (typeof live == "undefined") {
        live = true;
      }

      if (!live) {
        // We are on the search page, we need to update the results
        if (vm.$route.name != "search") {
          vm.$router.push({ name: "search" });
        }
      }

      vm.$store.dispatch("search/get", {
        type: vm.searchType,
        query: vm.searchQuery
      });
    }, 500)
}

```