Question: The below code search for the first column of any table on webpage, and i want to search the data from second column. what editing do i need to do to get the desired output ?

```
<script>
function myFunction() {
  var input, filter, table, tr, td, i;
  input = document.getElementById("myInput");
  filter = input.value.toUpperCase();
  table = document.getElementById("myTable");
  tr = table.getElementsByTagName("tr");
  for (i = 0; i < tr.length; i++) {
    td = tr[i].getElementsByTagName("td")[0];
    if (td) {
      if (td.innerHTML.toUpperCase().indexOf(filter) > -1) {
        tr[i].style.display = "";
      } else {
        tr[i].style.display = "none";
      }
    }       
  }
}
</script>

```

Answer: 
You may also try to update your global `composer` package with this command.

```
composer self-update

```

I was having this error because I had an old version of composer that wasn't reading the @ symbols.
I have changed

```
 "scripts": {
    "post-autoload-dump": [
        "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
        "@/usr/local/bin/php artisan package:discover --ansi"
    ],
    "post-root-package-install": [
        "@/usr/local/bin/php -r \"file_exists('.env') || copy('.env.example', '.env');\""
    ],
    "post-create-project-cmd": [
        "@/usr/local/bin/php artisan key:generate --ansi"
    ]
}

```

to 

```
"scripts": {
    "post-autoload-dump": [
        "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
        "@php artisan package:discover --ansi"
    ],
    "post-root-package-install": [
        "@/usr/local/bin/php -r \"file_exists('.env') || copy('.env.example', '.env');\""
    ],
    "post-create-project-cmd": [
        "@php artisan key:generate --ansi"
    ]
}

```

in composer.json