Question: I am a Laravel/web newbie, and am working with a Laravel application inherited from someone else. In the blades, I see two ways in which forms are written.

1. `<form action="{{ route('getdata') }}"`
2. `{!! Form::open(array('url'=>'getdata','`  

I think in the first case, the form starts in HTML format and route alone is defined in laravel format whereas in the second case, even form is defined in Laravel format. Which is preferred and what are the differences? I tried replacing the second format with the first and got a `Route [/getdata] not defined` error. Laravel Version is 6.

Answer: 
Easily done with Associative arrays

```
declare -A array

for file in *.txt; { array[${file%-*}]=''; }
echo ${!array[@]}

```

Update. If `declare -A array` removed then we've got simple indexed array witch in this case is also works, because we need to store only numbers, but we store them as indexes not as data.
you can make use of associative arrays

```
declare -A chk
declare -a uniques
while read -r line; do
  #do something with line or use multiple variables instead of line
  v="$(cut -d " " -f 1 <<< $line)"
  [[ ${chk[$v]} ]] || uniques+=("$v")
  chk[$v]=1
done < file.txt

```