Question: The browser URL is not supposed to be altered but it is anyway. That is supposed to be prevented by event.preventDefault() in the event listener for the cityNameSubmit button.

```
<!DOCTYPE html>
<html>
  <head>
    <script>
    function bindButton() {
      document.getElementById('cityNameSubmit').addEventListener('click', function (event) {
        event.preventDefault();
      })
    }
    </script>
  </head>
  <body>
    <form>
      <fieldset>
        <legend>Choose a City</legend>
        <input type="text" name="cityName" id="cityName">
        <input type="submit" id="cityNameSubmit">
      </fieldset>
    </form>
  </body>
</html>

```

Answer: 
If you want to get Name with Parent Name than you can use below query : 

```
SELECT qgt.name,pqgt.name FROM quotes_glass_types as qgt LEFT JOIN quotes_glass_types as pqgt ON qgt.id = pqgt.parent_id

```

You have to use LEFT JOIN on the same table. I don't know how to write this query in Laravel but this query works in phpmyadmin.

Please check it.
You can do like this-

```
DB::table('quotes_glass_types')

->select('quotes_glass_types.*', 'qgt.name as parent_name')

->leftjoin('quotes_glass_types as qgt', 'qgt.id', '=', 'quotes_glass_types.parent_id')

->get();

```