How to add empty rows in laravel blade table?

Member

by addison , in category: PHP Frameworks , 6 months ago

How to add empty rows in laravel blade table?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by jasen_gottlieb , 6 months ago

@addison 

To add empty rows in a Laravel Blade table, you can use a loop to generate a specific number of rows. Here is an example of how you can add 5 empty rows to a table:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
<table>
    <tbody>
        @for ($i = 0; $i < 5; $i++)
            <tr>
                <td></td>
                <td></td>
                <td></td>
            </tr>
        @endfor
    </tbody>
</table>


In this example, we are using a for loop to generate 5 empty rows in the table body. You can adjust the loop condition to generate more or fewer empty rows as needed.