Blade Loops

Blade Loops

All the basic syntax of loop is same as in another programming language, but we have to start with @ symbol.

For example:

<html>

    <head>

        <title>Laravel Practice</title>

    </head>

    <body class=”container”>

        <div class=”row”>

            <div class=”card col-md-8 mt-5 mx-auto”>

            @for ($i=0; $i<=5; $i++)

                <p> Value of is {{$i}} </p>

                @endfor

            </div>

        </div>

    </body>

</html>

Post Your Comments & Reviews

Your email address will not be published. Required fields are marked *

*

*