PHP Classes

File: examples/views/Test/loop2.blade.php

Recommend this page to a friend!
  Classes of Jorge Castro   BladeOne   examples/views/Test/loop2.blade.php   Download  
File: examples/views/Test/loop2.blade.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: BladeOne
Standalone template engine that compiles into PHP
Author: By
Last change: 3.44.2 It used a base 1 index to compare if the value was the last one. Now, it is fixed: $loop->last returns true if it is the last value (@foreach)
Date: 2 years ago
Size: 907 bytes


Class file image Download
    <title>Example of Loop 2</title>
    <!-- Google Fonts -->
    <link rel="stylesheet" href="//,300italic,700,700italic">
    <!-- CSS Reset -->
    <link rel="stylesheet" href="//">
    <!-- Milligram CSS minified -->
    <link rel="stylesheet" href="//">
<h1>Example of Loops</h1>
@foreach ($users as $user)
    Name user:{{$user->name}}<br>
    @foreach ($user->posts as $post)
            {{$loop->index}}<br> {{$loop->even}}: Subject:{{$post->subject}}</li>