Template directive: post

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

    <input type="text" name="username" value="@post.username" >
    <input type="password" name="pass" value="@post.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="post">
  
    @csrf

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

    <button @btn('save')></button>
    
  </form>
                  
From the sample above, since the name attribute is an array, the @post 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.