Template directive: for

The @for(): directive is part of the conditional loop operator directives. It is being used to loop through a list of item.
for
Example: conditional for
  <?php 
  
  namespace spoova\mi\windows\Routes;
  
  use Route;
  
  class Home extends Route {
  
     function __construct() {
    
        self::call($this, [
        
           // declare accepted urls
           lastUrl() => 'home';
           
           // parse variable arguments
           SELF::ARGS => [
            'list' => [1, 2, 3]
           ] 

        ]);
     
     } 
     
     function home($args) {
       
       self::load('home' => compile($args));
       
     }
  
  } 
                
In the compiled template file, we can loop through the parsed variables using the @for(): condition. This is shown below
   @for($i=0; $i <= count($list); $i++): 
   
    List {{ $list[$i] }} <br>
     
   @endfor;
                
The response returned above will be
    
  List 1 
    
  List 2 
    
  List 3