Template directive: get

The @get directive is used to obtain the last value sent from a form's get request method.
get
Example: Get
  <form method="get">
  
    @csrf

    <input type="text" name="username" value="@get.username" >
    <input type="password" name="pass" value="@get.pass">

    <button @btn('login')></button> 
    
  </form>
                  
This can also be used for obtaining string or integer values from a form's array data. This is shown below
  <form method="get">
  
    @csrf

    <input type="text" name="names[]" value="@get.names[0]" >
    <input type="text" name="names[]" value="@get.names[1]">

    <button @btn('save')></button>
    
  </form>
                  
From the sample above, since the name attribute is an array, the @get directive makes it easier to obtain the last value of the array by supplying the array key. The value will be added only when it exists.